/**
 * InnoSchedule Enhanced Frontend Styles
 * Multi-step appointment booking interface
 * 
 * @package InnoSchedule
 * @since 1.3.2
 */

/* Progress Steps */
.inno-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
    position: relative;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.inno-progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: #e1e1e1;
    z-index: 1;
}

.inno-progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    min-width: 100px;
    flex-shrink: 0;
}

.inno-progress-steps .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e1e1e1;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.inno-progress-steps .step.active .step-number {
    background: #1F5FFF;
    color: white;
}

.inno-progress-steps .step.completed .step-number {
    background: #46b450;
    color: white;
}

.inno-progress-steps .step-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.inno-progress-steps .step-description {
    font-size: 12px;
    color: #666;
}

.inno-progress-steps .step.active .step-label {
    color: #1F5FFF;
}

/* Multi-Step Form */
.form-step {
    display: none;
    padding: 20px 0;
}

.form-step.active {
    display: block;
}

.step-header {
    margin-bottom: 25px;
    text-align: center;
}

.step-header h4 {
    margin: 0 0 8px;
    color: #333;
    font-size: 22px;
    font-weight: 600;
}

.step-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Field Groups */
.field-group {
    margin-bottom: 20px;
}

.field-group-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.field-label .required {
    color: #d63638;
}

/* Input Styles */
.patient-lookup-field,
.appointment-select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

/* Insurance Read-Only Styling */
.insurance-readonly {
    background-color: #f5f5f5 !important;
    color: #6c757d !important;
    border-color: #d6d8db !important;
    cursor: not-allowed !important;
}

.insurance-readonly:focus {
    border-color: #d6d8db !important;
    box-shadow: none !important;
}

.patient-lookup-field:focus,
.appointment-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: #1F5FFF;
    box-shadow: 0 0 0 1px #1F5FFF;
}

/* Lookup Spinner */
.lookup-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.lookup-spinner .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Lookup Results */
.lookup-results {
    margin-top: 15px;
}

.lookup-result {
    padding: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lookup-result.found {
    background: #e7f7e7;
    border: 1px solid #46b450;
    color: #155724;
}

.lookup-result.new {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.lookup-result .icon {
    font-weight: bold;
    font-size: 18px;
}

/* Verification Prompt */
.verification-prompt {
    background: #f0f8ff;
    border: 1px solid #1F5FFF;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.verification-prompt p {
    margin: 0;
    color: #004085;
    font-size: 14px;
}

/* Enhanced Patient Information Sections */
.insurance-section,
.payment-section,
.contact-preferences-section,
.emergency-contact-section {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fafafa;
}

.insurance-section h5,
.payment-section h5,
.contact-preferences-section h5,
.emergency-contact-section h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #1F5FFF;
    padding-bottom: 8px;
}

.insurance-note {
    background-color: #e8f4fd;
    border: 1px solid #b8ddf0;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
}

.insurance-note p {
    margin: 0;
    color: #2c5282;
    font-size: 14px;
    line-height: 1.4;
}

/* Insurance Alert (yellow warning for new patients) */
.insurance-alert {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
}

.insurance-alert p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.insurance-group {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.insurance-group h6 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-note {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Select styling */
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    box-sizing: border-box;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

select:focus {
    outline: none;
    border-color: #1F5FFF;
    box-shadow: 0 0 0 2px rgba(31, 95, 255, 0.1);
}

/* Readonly input styling */
input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

input[readonly]:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

.btn-next,
.btn-back,
.btn-submit,
.btn-start-over {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-next {
    background: #04CE78;
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    background: #03b069;
}

.btn-back {
    background: #f1f1f1;
    color: #666;
}

.btn-back:hover {
    background: #e1e1e1;
}

.btn-submit {
    background: #46b450;
    color: white;
    margin-left: auto;
}

.btn-submit:hover {
    background: #368f3c;
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-start-over {
    background: #1F5FFF;
    color: white;
    margin-right: auto;
}

.btn-start-over:hover {
    background: #0d47e6;
}

/* Messages */
.widget-messages {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
}

.widget-messages.success {
    background: #e7f7e7;
    border: 1px solid #46b450;
    color: #155724;
}

.widget-messages.error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.widget-messages.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Widget Container */
.inno-schedule-widget {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.inno-schedule-widget[data-theme="modern"] {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Title */
.inno-schedule-title {
    margin: 0 0 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
}

/* Form Styles */
.inno-schedule-form {
    display: grid;
    gap: 20px;
}

/* Fieldsets */
.inno-schedule-fieldset {
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    margin: 0;
}

.inno-schedule-fieldset legend {
    font-weight: 600;
    color: #555;
    padding: 0 10px;
}

/* Form Controls */
.inno-schedule-fieldset label {
    display: block;
    margin: 10px 0 5px;
    font-weight: 500;
    color: #555;
}

.inno-schedule-fieldset input[type="text"],
.inno-schedule-fieldset input[type="email"],
.inno-schedule-fieldset input[type="tel"],
.inno-schedule-fieldset input[type="date"],
.inno-schedule-fieldset select,
.inno-schedule-fieldset textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.inno-schedule-fieldset input:focus,
.inno-schedule-fieldset select:focus,
.inno-schedule-fieldset textarea:focus {
    outline: none;
    border-color: #1F5FFF;
    box-shadow: 0 0 0 2px rgba(31, 95, 255, 0.2);
}

/* Radio buttons */
.inno-schedule-fieldset input[type="radio"] {
    margin-right: 8px;
}

.inno-schedule-fieldset label:has(input[type="radio"]) {
    display: inline-block;
    margin-right: 20px;
    cursor: pointer;
}

/* Required indicator */
.required {
    color: #d54e21;
}

/* Time Slots */
.available-times {
    margin-top: 15px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.time-slot:hover {
    border-color: #1F5FFF;
    background: #f0f6ff;
}

.time-slot.selected {
    background: #1F5FFF;
    color: white;
    border-color: #0d47e6;
}

.time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Submit Button */
.inno-schedule-submit {
    text-align: center;
    margin-top: 20px;
}

.inno-schedule-button {
    background: #1F5FFF;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.inno-schedule-button:hover {
    background: #0d47e6;
}

.inno-schedule-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.inno-schedule-messages {
    margin-top: 15px;
}

.inno-schedule-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.inno-schedule-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.inno-schedule-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.inno-schedule-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Loading State */
.inno-schedule-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.inno-schedule-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1F5FFF;
    border-radius: 50%;
    animation: inno-schedule-spin 1s linear infinite;
}

@keyframes inno-schedule-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Patient lookup results styling */
.lookup-result {
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.lookup-result.found {
    background: #d4edda;
    color: #000;
    border: 1px solid #c3e6cb;
    font-weight: normal;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

.lookup-result.found p {
    text-align: center !important;
    margin: 0;
    padding: 0;
    width: 100%;
}

.lookup-result.found i.icon {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: none;
}

.lookup-result.new {
    background: #cce7ff;
    color: #000;
    border: 1px solid #b3d7ff;
    font-weight: normal;
    text-align: center;
}

.verification-prompt {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #cce7ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    color: #000;
    font-weight: normal;
}

/* Phone lookup option styling */
.phone-lookup-option {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.phone-lookup-option p {
    margin: 0 0 10px 0;
    color: #856404;
}

.phone-lookup-option p:last-of-type {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.btn-phone-lookup {
    background: #1F5FFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-phone-lookup:hover {
    background: #0d47e6;
}

/* Phone lookup field highlight */
.phone-lookup-highlight {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.25) !important;
    transition: all 0.3s ease;
}

.phone-lookup-highlight:focus {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4) !important;
}

/* Multiple matches display */
.phone-matches-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.phone-matches-container h5 {
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
}

.patient-match {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-match:hover {
    border-color: #1F5FFF;
    background: #f0f6ff;
}

.patient-match:last-child {
    margin-bottom: 0;
}

.patient-match-info {
    flex: 1;
}

.patient-match-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.patient-match-dob {
    color: #666;
    font-size: 14px;
}

.patient-match-select {
    background: #1F5FFF;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.patient-match-select:hover {
    background: #0d47e6;
}

/* Existing appointments styling */
.existing-appointments {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #1F5FFF;
}

.existing-appointments h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.appointments-list {
    margin-bottom: 15px;
}

.appointment-item {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: box-shadow 0.2s ease;
}

.appointment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.appointment-date {
    flex: 1;
}

.appointment-date .date {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
}

.appointment-date .time {
    display: block;
    color: #666;
    font-size: 14px;
}

.appointment-details {
    text-align: right;
    flex-shrink: 0;
}

.appointment-details .duration {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
}

.appointment-details .status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-scheduled {
    background: #d4edda;
    color: #155724;
}

.status-planned {
    background: #fff3cd;
    color: #856404;
}

.status-complete {
    background: #cce5ff;
    color: #004085;
}

.appointment-item .note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

.book-additional {
    margin: 15px 0 0 0;
    font-weight: 500;
    color: #1F5FFF;
}

.appointments-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.appointments-notice strong {
    color: #664d03;
}

/* Responsive design for appointments */
@media (max-width: 768px) {
    .appointment-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .appointment-details {
        text-align: left;
        margin-top: 10px;
        width: 100%;
    }
    
    .appointment-details .duration,
    .appointment-details .status {
        display: inline-block;
        margin-right: 10px;
    }
}

/* License/Error Messages */
.inno-schedule-license-notice,
.inno-schedule-unavailable {
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    text-align: center;
}

.inno-schedule-license-notice a {
    color: #856404;
    text-decoration: underline;
}

/* Payment Section */
.payment-section {
    background: #f8f9fa;
    border-color: #e9ecef;
}

#stripe-elements {
    padding: 10px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .inno-schedule-widget {
        padding: 15px;
        margin: 10px;
    }
    
    /* Progress Steps Mobile Fix */
    .inno-progress-steps {
        padding: 0 10px;
        margin-bottom: 20px;
        justify-content: center;
        gap: 15px;
        text-align: center;
    }
    
    .inno-progress-steps::before {
        display: none; /* Hide progress line on mobile */
    }
    
    .inno-progress-steps .step {
        min-width: 80px;
        flex-shrink: 0;
        text-align: center;
        align-items: center;
    }
    
    .inno-progress-steps .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .inno-progress-steps .step-label {
        font-size: 12px;
        margin-bottom: 2px;
    }
    
    .inno-progress-steps .step-description {
        font-size: 10px;
        line-height: 1.1;
    }
    
    /* Title Mobile Fix */
    .inno-schedule-title {
        font-size: 20px;
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    /* Field Group Mobile Fix */
    .field-group-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Step Header Mobile */
    .step-header h4 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .step-header p {
        font-size: 14px;
    }
    
    /* Button Navigation Mobile */
    .step-navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .btn-next,
    .btn-back,
    .btn-submit,
    .btn-start-over {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 16px;
        margin: 0;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .inno-schedule-fieldset label:has(input[type="radio"]) {
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Extra Small Mobile Screens */
@media (max-width: 480px) {
    .inno-schedule-widget {
        padding: 12px;
        margin: 5px;
    }
    
    /* Ultra compact progress steps */
    .inno-progress-steps {
        padding: 0 5px;
        gap: 8px;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .inno-progress-steps::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .inno-progress-steps .step {
        min-width: 65px;
    }
    
    .inno-progress-steps .step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .inno-progress-steps .step-label {
        font-size: 11px;
        font-weight: 500;
    }
    
    .inno-progress-steps .step-description {
        font-size: 9px;
        display: none; /* Hide on very small screens */
    }
    
    /* Make steps even smaller for real iPhone */
    .inno-progress-steps .step {
        min-width: 55px;
    }
    
    .inno-progress-steps .step-number {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .inno-progress-steps .step-label {
        font-size: 10px;
        line-height: 1.1;
    }
    
    /* Compact title */
    .inno-schedule-title {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    /* Compact form elements */
    .patient-lookup-field,
    .appointment-select,
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    textarea {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Touch-friendly buttons */
    .btn-next,
    .btn-back,
    .btn-submit,
    .btn-start-over {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 48px; /* Touch target accessibility */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .inno-schedule-fieldset input,
    .inno-schedule-fieldset select,
    .inno-schedule-fieldset textarea,
    .time-slot,
    .inno-schedule-button {
        transition: none;
    }
    
    .inno-schedule-loading::after {
        animation: none;
    }
}

/* Quick Navigation Styles */
.calendar-quick-nav {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-nav-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-nav-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.month-selector {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    min-width: 160px;
    cursor: pointer;
}

.month-selector:focus {
    outline: none;
    border-color: #1F5FFF;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.quick-jump-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-jump-btn {
    background: #1F5FFF;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-jump-btn:hover {
    background: #0d47e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.quick-jump-btn:active {
    transform: translateY(0);
}

/* Responsive Quick Navigation */
@media (max-width: 768px) {
    .calendar-quick-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 15px;
    }
    
    .quick-nav-section {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .month-selector {
        min-width: 100%;
    }
    
    .quick-jump-buttons {
        justify-content: center;
    }
    
    .quick-jump-btn {
        flex: 1;
        min-width: 65px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .calendar-quick-nav {
        padding: 12px;
        margin-bottom: 15px;
        gap: 10px;
    }
    
    .quick-nav-section:last-child {
        width: 100%;
    }
    
    .quick-jump-buttons {
        width: 100%;
        gap: 6px;
    }
    
    .quick-jump-btn {
        flex: 1;
        padding: 12px 8px;
        font-size: 12px;
    }
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.calendar-nav {
    background: #1F5FFF;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.calendar-nav:hover {
    background: #0d47e6;
}

.calendar-nav:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#calendar-month-year {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-row {
    display: contents;
}

.calendar-cell {
    background: white;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-cell.header {
    background: #f8f9fa;
    min-height: 40px;
    font-weight: 600;
    color: #555;
    justify-content: center;
    cursor: default;
    font-size: 14px;
    border-bottom: 2px solid #ddd;
}

.calendar-cell.empty {
    background: #f8f9fa;
    cursor: default;
}

.calendar-day {
    border: 2px solid transparent;
}

.calendar-day:hover:not(.past):not(.unavailable) {
    background: #f0f8ff;
    border-color: #1F5FFF;
}

.calendar-day.today {
    background: #fff3cd;
    border-color: #ffc107;
}

.calendar-day.past {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.unavailable {
    background: #fff5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #f0fff4;
    cursor: pointer;
}

.calendar-day.available:hover {
    background: #e6ffed;
    border-color: #28a745;
}

.calendar-day.selected {
    background: #1F5FFF;
    color: white;
    border-color: #0d47e6;
}

.calendar-day.selected .availability-indicator {
    color: #fff;
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1;
}

.availability-indicator {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    color: #666;
    font-weight: 500;
}

.calendar-day.available .availability-indicator {
    color: #28a745;
    font-weight: 600;
}

.calendar-day.unavailable .availability-indicator {
    color: #dc3545;
}

.calendar-day.past .availability-indicator {
    color: #999;
}

.calendar-loading,
.calendar-error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.calendar-error {
    color: #dc3545;
}

/* Time Slots Container */
#time-slots-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#time-slots-container h4 {
    margin: 0 0 15px;
    color: #333;
    font-size: 16px;
}

#time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.time-slot {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.time-slot:hover {
    background: #f0f6ff;
    border-color: #1F5FFF;
}

.time-slot.selected {
    background: #1F5FFF;
    color: white;
    border-color: #0d47e6;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-cell {
        min-height: 60px;
        padding: 6px 2px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .availability-indicator {
        font-size: 10px;
    }
    
    #time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .time-slot {
        padding: 10px 6px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .calendar-cell {
        min-height: 50px;
        padding: 4px 2px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .availability-indicator {
        font-size: 9px;
    }
    
    .calendar-header {
        margin-bottom: 15px;
    }
    
    #calendar-month-year {
        font-size: 16px;
    }
    
    .calendar-nav {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Time Slots Section */
.time-slots-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.selected-date-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.selected-date-display {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.time-slots-container h6 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Enhanced time slots styling */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.time-slot {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-slot:hover {
    border-color: #1F5FFF;
    background-color: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15);
}

.time-slot.selected {
    border-color: #1F5FFF;
    background-color: #1F5FFF;
    color: #ffffff;
}

.time-slot .time {
    font-size: 16px;
    font-weight: 600;
}

.time-slot .capacity {
    font-size: 12px;
    opacity: 0.8;
}

.time-slot.selected .capacity {
    color: rgba(255, 255, 255, 0.9);
}

/* Operatory information styling */
.time-slot .operatory-info {
    font-size: 11px;
    opacity: 0.7;
    color: #666;
    font-weight: 500;
    margin-top: 2px;
}

.time-slot.selected .operatory-info {
    color: rgba(255, 255, 255, 0.8);
}

.time-slot:hover .operatory-info {
    opacity: 0.9;
    color: #0d47e6;
}

/* No slots message */
.no-slots {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 40px 0;
}

/* Appointment Confirmation Styles */
.confirmation-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

.confirmation-card h5 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #1F5FFF;
    padding-bottom: 12px;
}

.confirmation-section {
    margin-bottom: 20px;
}

.confirmation-section:last-child {
    margin-bottom: 0;
}

.confirmation-section h6 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1F5FFF;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-row .value {
    color: #333;
    text-align: right;
    flex-grow: 1;
    margin-left: 16px;
    word-break: break-word;
}

/* Notes Section Styling */
.notes-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.notes-section .field-group {
    margin-bottom: 0;
}

.notes-section .field-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.notes-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.notes-section textarea:focus {
    border-color: #1F5FFF;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.notes-section .field-note {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Responsive adjustments for confirmation */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-row .label {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .detail-row .value {
        text-align: left;
        margin-left: 0;
    }
    
    .confirmation-card {
        padding: 16px;
    }
}

/* Success Page */
.appointment-success {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.appointment-success .success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
    font-weight: bold;
}

.appointment-success h3 {
    color: #28a745;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 600;
}

.appointment-success p {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.appointment-success .appointment-id {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.appointment-success .confirmation-message {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 20px;
    margin-top: 25px;
}

.appointment-success .confirmation-message p {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 15px;
    line-height: 1.6;
}

.appointment-success .confirmation-message p:last-child {
    margin-bottom: 0;
}

.appointment-success .confirmation-message ul,
.appointment-success .confirmation-message ol {
    margin: 10px 0;
    padding-left: 20px;
    color: #1565c0;
}

.appointment-success .confirmation-message li {
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 1.6;
}

.appointment-success .confirmation-message strong {
    color: #0d47a1;
    font-weight: 600;
}

.appointment-success .confirmation-message a {
    color: #0d47a1;
    text-decoration: underline;
}

.appointment-success .confirmation-message a:hover {
    color: #1976d2;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .inno-schedule-widget {
        border-color: #000;
    }
    
    .inno-schedule-fieldset {
        border-color: #000;
    }
    
    .inno-schedule-fieldset input,
    .inno-schedule-fieldset select,
    .inno-schedule-fieldset textarea {
        border-color: #000;
    }
}

/* Family Scheduling Styles */
#family-information {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

#family-information h5 {
    color: #0d47a1;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 18px;
}

#family-information h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.family-section-appointments,
.family-section-schedule,
.family-section-parent {
    margin-bottom: 25px;
}

.family-section-appointments:last-child,
.family-section-schedule:last-child,
.family-section-parent:last-child {
    margin-bottom: 0;
}

/* Family Appointments */
.family-appointments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.family-appointment-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 12px 15px;
    transition: box-shadow 0.2s ease;
}

.family-appointment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.family-appointment-item .appointment-info strong {
    color: #0d47a1;
    font-weight: 600;
}

.family-appointment-item .appointment-details {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

.appointment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-left: 10px;
}

.appointment-status.status-scheduled {
    background: #e3f2fd;
    color: #0d47a1;
}

.appointment-status.status-complete {
    background: #e8f5e8;
    color: #2e7d32;
}

.appointment-status.status-planned {
    background: #fff3e0;
    color: #f57c00;
}

/* Family Members Scheduling */
.family-members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.family-member-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.family-member-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #0d47a1;
}

.family-member-item .member-info {
    flex: 1;
}

.family-member-item .member-info strong {
    color: #0d47a1;
    font-weight: 600;
    font-size: 16px;
}

.family-member-item .member-details {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

.family-member-item .schedule-family-member {
    background: #0d47a1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.family-member-item .schedule-family-member:hover {
    background: #1976d2;
}

/* Parent Information Update */
.parent-info-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.parent-info-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #6c757d;
}

.parent-info-item .parent-info {
    flex: 1;
}

.parent-info-item .parent-info strong {
    color: #495057;
    font-weight: 600;
    font-size: 16px;
}

.parent-info-item .parent-details {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

.parent-info-item .update-parent-info {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.parent-info-item .update-parent-info:hover {
    background: #495057;
}

/* Responsive Design for Family Sections */
@media (max-width: 768px) {
    .family-member-item,
    .parent-info-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .family-member-item .schedule-family-member,
    .parent-info-item .update-parent-info {
        margin-left: 0;
        width: 100%;
    }
}

/* Family Success Section */
#family-information-success {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

#family-information-success h5 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
}

#family-information-success > p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
}

.family-success-section {
    background: #ffffff;
    border-radius: 6px;
    padding: 15px;
}

/* Loading Animations */
.calendar-loading,
.loading-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.calendar-loading::before,
.loading-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #dee2e6;
    border-top: 4px solid #1F5FFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    margin-bottom: 8px;
    animation: pulse 2s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced loading for time slots */
#time-slots .loading-message {
    min-height: 120px;
    padding: 30px 20px;
}

#time-slots .loading-spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

#time-slots .loading-text {
    font-size: 14px;
}

/* Calendar loading specific styles */
.calendar-loading {
    border: 2px dashed #1F5FFF;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.calendar-loading .loading-spinner {
    border-top-color: #1F5FFF;
    border-right-color: #9c27b0;
}

.calendar-loading .loading-text {
    color: #1565c0;
}

/* COMPREHENSIVE iPhone 2024 breakpoints - GUARANTEED FIT SOLUTION */

/* iPhone 15 Pro Max and similar large devices */
@media (max-width: 430px) {
    .inno-progress-steps {
        gap: 8px !important;
        padding: 0 5px !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .inno-progress-steps .step {
        min-width: 95px !important;
        flex-shrink: 0 !important;
        max-width: 95px !important;
    }
    
    .inno-progress-steps .step-number {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
    
    .inno-progress-steps .step-label {
        font-size: 11px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* iPhone 15 Pro, iPhone 14 Pro */
@media (max-width: 393px) {
    .inno-progress-steps {
        gap: 6px !important;
        padding: 0 4px !important;
    }
    
    .inno-progress-steps .step {
        min-width: 85px !important;
        max-width: 85px !important;
    }
    
    .inno-progress-steps .step-number {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }
    
    .inno-progress-steps .step-label {
        font-size: 10px !important;
    }
}

/* iPhone 14, iPhone 13 */
@media (max-width: 390px) {
    .inno-progress-steps {
        gap: 5px !important;
        padding: 0 3px !important;
    }
    
    .inno-progress-steps .step {
        min-width: 80px !important;
        max-width: 80px !important;
    }
    
    .inno-progress-steps .step-number {
        width: 28px !important;
        height: 28px !important;
        font-size: 10px !important;
    }
    
    .inno-progress-steps .step-label {
        font-size: 9px !important;
    }
}

/* iPhone 12 Mini and smaller */
@media (max-width: 375px) {
    .inno-progress-steps {
        gap: 4px !important;
        padding: 0 2px !important;
    }
    
    .inno-progress-steps .step {
        min-width: 75px !important;
        max-width: 75px !important;
    }
    
    .inno-progress-steps .step-number {
        width: 26px !important;
        height: 26px !important;
        font-size: 9px !important;
    }
    
    .inno-progress-steps .step-label {
        font-size: 8px !important;
    }
}

/* Ultra-compact for very old devices */
@media (max-width: 360px) {
    .inno-progress-steps {
        gap: 3px !important;
        padding: 0 1px !important;
    }
    
    .inno-progress-steps .step {
        min-width: 70px !important;
        max-width: 70px !important;
    }
    
    .inno-progress-steps .step-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 8px !important;
    }
    
    .inno-progress-steps .step-label {
        font-size: 7px !important;
        font-weight: 700 !important;
    }
}

/* NUCLEAR OPTION: Force steps to fit using calc() - GUARANTEED TO WORK */
@media (max-width: 430px) {
    .inno-progress-steps {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }
    
    .inno-progress-steps .step {
        width: calc((100vw - 60px) / 4) !important;
        min-width: calc((100vw - 60px) / 4) !important;
        max-width: calc((100vw - 60px) / 4) !important;
    }
}