/* Goodlife Scheduling Component Styles
   Color Scheme:
   - Primary Green: #10803B
   - Secondary Green: #75C829
   - Dark Gray: #424242
   - White: #FFFFFF

   Note: Host page uses html { font-size: 10px }, so we use px values
*/

/* ===== Base Container ===== */
.gl-scheduler {
    font-family: 'Nunito Sans', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px !important;
    line-height: 1.6;
    /* width: 100% pins the scheduler to its container's full width; otherwise a
       flex/inline-block host (e.g. Book.razor's .book-online-inner) sizes the
       scheduler to its current content, causing the step indicator to compress
       horizontally when the loading state replaces the form with just a spinner. */
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: #1f2937;
}

/* Reset inherited styles */
.gl-scheduler * {
    box-sizing: border-box;
}

.gl-scheduler p,
.gl-scheduler h1,
.gl-scheduler h2,
.gl-scheduler h3,
.gl-scheduler h4,
.gl-scheduler ul,
.gl-scheduler ol {
    margin: 0;
    padding: 0;
}

/* ===== Progress Indicator ===== */
.gl-scheduler-progress {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.gl-progress-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.gl-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.gl-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 28px);
    width: calc(100% - 56px);
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

.gl-progress-step.completed:not(:last-child)::after {
    background: #10803B;
}

.gl-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.gl-progress-step.active .gl-step-number {
    background: #10803B;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 128, 59, 0.2);
}

.gl-progress-step.completed .gl-step-number {
    background: #10803B;
    color: #ffffff;
}

.gl-step-label {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gl-progress-step.active .gl-step-label,
.gl-progress-step.completed .gl-step-label {
    color: #10803B;
}

/* ===== Loading State ===== */
.gl-scheduler-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    color: #6b7280;
    font-size: 18px;
}

.gl-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #10803B;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

.gl-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Step Content ===== */
.gl-step-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gl-step-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px;
    line-height: 1.2;
}

.gl-step-description {
    color: #6b7280;
    margin: 0 0 36px;
    font-size: 18px;
    line-height: 1.5;
}

.gl-subsection-title {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 28px 0 16px;
}

/* ===== Form Elements ===== */
.gl-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gl-form-group {
    display: flex;
    flex-direction: column;
}

.gl-form-group-full {
    grid-column: 1 / -1;
}

.gl-label {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.gl-label-required::after {
    content: ' *';
    color: #dc2626;
}

.gl-input,
.gl-select {
    padding: 16px 20px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 18px;
    color: #1f2937;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    width: 100%;
}

.gl-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.gl-input:focus,
.gl-select:focus {
    outline: none;
    border-color: #10803B;
    box-shadow: 0 0 0 3px rgba(16, 128, 59, 0.15);
}

.gl-input::placeholder {
    color: #9ca3af;
}

.gl-select-placeholder {
    color: #9ca3af;
}

.gl-select-placeholder option:not([disabled]) {
    color: #424242;
}

/* ===== Custom Select (GlSelect) ===== */
.gl-select-container {
    position: relative;
    width: 100%;
}

.gl-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    padding-right: 48px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 18px;
    color: #1f2937;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    position: relative;
    line-height: 1.6;
}

.gl-select-trigger:focus {
    outline: none;
    border-color: #10803B;
    box-shadow: 0 0 0 3px rgba(16, 128, 59, 0.15);
}

.gl-select-trigger:focus-visible {
    outline: 3px solid #10803B;
    outline-offset: 2px;
}

.gl-select-trigger[aria-expanded="true"] {
    border-color: #10803B;
    box-shadow: 0 0 0 3px rgba(16, 128, 59, 0.15);
}

.gl-select-trigger.gl-select-placeholder .gl-select-value {
    color: #9ca3af;
}

.gl-select-trigger.gl-select-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gl-select-trigger.gl-input-error {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.gl-select-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: transform 0.2s;
    pointer-events: none;
    flex-shrink: 0;
}

.gl-select-trigger[aria-expanded="true"] .gl-select-chevron {
    transform: translateY(-50%) rotate(180deg);
}

.gl-select-listbox {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 50;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.gl-select-listbox-open {
    display: block;
}

.gl-select-option {
    padding: 12px 20px;
    font-size: 18px;
    color: #1f2937;
    cursor: pointer;
    transition: background-color 0.1s;
    list-style: none;
}

.gl-select-option.gl-select-highlighted {
    background: rgba(16, 128, 59, 0.08);
}

.gl-select-option.gl-select-selected {
    font-weight: 600;
    color: #10803B;
}

@media (prefers-reduced-motion: reduce) {
    .gl-select-chevron {
        transition: none;
    }
    .gl-select-trigger {
        transition: none;
    }
}

.gl-help-text {
    font-size: 14px;
    color: #6b7280;
    margin-top: 8px;
}

.gl-validation-message {
    font-size: 15px;
    color: #6b7280;
    font-style: italic;
}

/* ===== Buttons ===== */
.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
    gap: 10px;
}

.gl-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gl-btn-primary {
    background: #10803B;
    color: #ffffff;
}

.gl-btn-primary:hover:not(:disabled) {
    background: #0d6830;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 128, 59, 0.25);
}

.gl-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
}

.gl-btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.gl-btn-link {
    background: none;
    color: #10803B;
    padding: 10px;
    text-decoration: underline;
    font-size: 16px;
}

.gl-btn-link:hover {
    color: #0d6830;
}

.gl-btn-confirm {
    padding: 20px 40px;
    font-size: 20px;
}

.gl-btn-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.gl-btn-icon-left {
    margin-right: 4px;
}

.gl-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
    gap: 20px;
}

/* ===== Patient Toggle ===== */
.gl-patient-toggle {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.gl-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #4b5563;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gl-toggle-btn:hover {
    border-color: #10803B;
    color: #10803B;
}

.gl-toggle-btn.selected {
    border-color: #10803B;
    background: rgba(16, 128, 59, 0.05);
    color: #10803B;
}

.gl-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gl-toggle-icon svg {
    width: 28px;
    height: 28px;
}

/* ===== Date/Time Selection ===== */
.gl-datetime-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gl-date-picker {
    background: #f9fafb;
    border-radius: 10px;
    padding: 24px;
}

.gl-date-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.gl-date-list::-webkit-scrollbar {
    height: 8px;
}

.gl-date-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.gl-date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 110px;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gl-date-btn:hover {
    border-color: #10803B;
}

.gl-date-btn.selected {
    border-color: #10803B;
    background: #10803B;
    color: #ffffff;
}

.gl-date-day {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.gl-date-btn.selected .gl-date-day {
    color: rgba(255, 255, 255, 0.8);
}

.gl-date-num {
    font-size: 20px;
    font-weight: 700;
    margin: 6px 0;
    color: #1f2937;
}

.gl-date-btn.selected .gl-date-num {
    color: #ffffff;
}

.gl-date-slots {
    font-size: 13px;
    color: #75C829;
    font-weight: 500;
}

.gl-date-btn.selected .gl-date-slots {
    color: rgba(255, 255, 255, 0.9);
}

.gl-time-picker {
    background: #f9fafb;
    border-radius: 10px;
    padding: 24px;
}

.gl-time-grid {
    display: grid;
    /* Wider tiles than the old single-line "9:00 AM" buttons — each tile now
       lists every leg in the chain (range + type + provider). */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.gl-time-btn {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    gap: 10px;
}

.gl-time-btn:hover {
    border-color: #10803B;
}

.gl-time-btn.selected {
    border-color: #10803B;
    background: rgba(16, 128, 59, 0.05);
}

.gl-time-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.gl-time-legs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gl-time-leg {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
    line-height: 1.35;
}

.gl-time-btn.selected .gl-time-leg {
    background: rgba(16, 128, 59, 0.08);
}

.gl-time-leg-range {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.gl-time-leg-type {
    font-size: 13px;
    color: #10803B;
    font-weight: 600;
}

.gl-time-leg-provider {
    font-size: 13px;
    color: #6b7280;
}

.gl-selection-summary {
    background: linear-gradient(135deg, #10803B 0%, #0d6830 100%);
    border-radius: 10px;
    padding: 24px;
    color: #ffffff;
}

.gl-selection-summary .gl-subsection-title {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0;
    font-size: 18px;
}

.gl-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.gl-summary-icon {
    flex-shrink: 0;
}

.gl-summary-icon svg {
    width: 28px;
    height: 28px;
}

.gl-summary-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gl-summary-details strong {
    font-size: 18px;
}

.gl-summary-details > span {
    font-size: 16px;
    opacity: 0.9;
}

.gl-summary-legs {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gl-summary-leg {
    display: flex;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 2px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.35;
}

.gl-summary-leg-range {
    font-weight: 600;
}

.gl-summary-leg-type {
    opacity: 0.85;
}

.gl-summary-leg-provider {
    opacity: 0.85;
}

/* ===== Patient Search ===== */
.gl-patient-search,
.gl-patient-form {
    background: #f9fafb;
    border-radius: 10px;
    padding: 28px;
}

.gl-search-help {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 32px;
}

.gl-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.gl-search-btn-group {
    padding-bottom: 0;
}

.gl-search-btn-group .gl-btn {
    padding: 16px 28px;
    white-space: nowrap;
    min-height: 58px;
}



.gl-search-results {
    margin-top: 28px;
}

.gl-results-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.gl-patient-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 20px;
    margin-bottom: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    position: relative;
}

.gl-patient-result:hover {
    border-color: #10803B;
}

.gl-patient-result.selected {
    border-color: #10803B;
    background: rgba(16, 128, 59, 0.05);
}

.gl-result-name {
    font-weight: 600;
    font-size: 18px;
    color: #1f2937;
    flex-grow: 1;
}

.gl-result-details {
    display: flex;
    gap: 20px;
    font-size: 15px;
    color: #6b7280;
}

.gl-selected-check {
    position: absolute;
    right: 16px;
    bottom: 12px;
    color: #10803B;
}

.gl-selected-check svg {
    width: 24px;
    height: 24px;
}

/* ===== Match Confidence Indicators ===== */
.gl-results-hint {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 16px;
    font-style: italic;
}

.gl-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.gl-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.gl-match-badge svg {
    flex-shrink: 0;
}

.gl-match-high {
    background: rgba(16, 128, 59, 0.1);
    color: #10803B;
}

.gl-match-medium {
    background: rgba(117, 200, 41, 0.15);
    color: #4d7c0f;
}

.gl-match-low {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.gl-match-verylow {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.gl-patient-result.gl-match-high {
    border-left: 3px solid #10803B;
}

.gl-patient-result.gl-match-medium {
    border-left: 3px solid #75C829;
}

.gl-patient-result.gl-match-low {
    border-left: 3px solid #f59e0b;
}

.gl-patient-result.gl-match-verylow {
    border-left: 3px solid #ef4444;
}

.gl-no-results {
    text-align: center;
    padding: 40px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

.gl-no-results p {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 16px;
}

.gl-no-slots {
    text-align: center;
    padding: 60px 32px;
    background: #f9fafb;
    border-radius: 10px;
    color: #6b7280;
    font-size: 18px;
}

/* ===== Confirmation Review ===== */
.gl-confirmation-review {
    display: grid;
    gap: 24px;
}

.gl-review-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 28px;
}

.gl-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.gl-card-icon {
    color: #10803B;
    width: 24px;
    height: 24px;
}

.gl-patient-type-badge {
    margin-left: auto;
    padding: 6px 14px;
    background: #75C829;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
}

.gl-detail-list {
    display: grid;
    gap: 14px;
}

.gl-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.gl-detail-item dt {
    font-size: 16px;
    color: #6b7280;
}

.gl-detail-item dd {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    text-align: right;
}

/* ===== Notice Box ===== */
.gl-notice {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: rgba(117, 200, 41, 0.1);
    border: 1px solid rgba(117, 200, 41, 0.3);
    border-radius: 10px;
    margin-top: 28px;
}

.gl-notice-icon {
    flex-shrink: 0;
    color: #75C829;
    width: 24px;
    height: 24px;
}

.gl-notice-content {
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
}

/* ===== Error State ===== */
.gl-scheduler-error {
    text-align: center;
    padding: 60px 32px;
}

.gl-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #fef2f2;
    border-radius: 50%;
    color: #dc2626;
    margin-bottom: 28px;
}

.gl-error-icon svg {
    width: 40px;
    height: 40px;
}

.gl-error-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
}

.gl-error-content p {
    color: #6b7280;
    margin: 0 0 10px;
    font-size: 18px;
}

.gl-error-contact {
    font-weight: 500;
    color: #374151;
    font-size: 18px;
}

.gl-phone-link {
    color: #10803B;
    font-weight: 600;
    text-decoration: none;
}

.gl-phone-link:hover {
    text-decoration: underline;
}

.gl-scheduler-error .gl-btn {
    margin-top: 24px;
}

/* ===== Success State ===== */
.gl-scheduler-success {
    text-align: center;
    padding: 60px 32px;
}

.gl-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10803B 0%, #75C829 100%);
    border-radius: 50%;
    color: #ffffff;
    margin-bottom: 28px;
}

.gl-success-icon svg {
    width: 56px;
    height: 56px;
}

.gl-scheduler-success h3 {
    font-size: 30px;
    font-weight: 700;
    color: #10803B;
    margin: 0 0 28px;
}

.gl-confirmation-details {
    display: inline-block;
    text-align: left;
    background: #f9fafb;
    border-radius: 10px;
    padding: 28px 36px;
    margin-bottom: 28px;
}

.gl-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.gl-detail-label {
    font-size: 16px;
    color: #6b7280;
}

.gl-detail-value {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
}

.gl-confirmation-note {
    color: #6b7280;
    font-size: 16px;
    margin: 0 0 28px;
    line-height: 1.6;
}

.gl-scheduler-success > .gl-btn {
    margin-top: 12px;
}

/* ===== Accident Inquiry Step ===== */
.gl-accident-inquiry {
    background: #f9fafb;
    border-radius: 10px;
    padding: 36px;
    text-align: center;
}

.gl-inquiry-prompt {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 28px;
    line-height: 1.4;
}

.gl-inquiry-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.gl-inquiry-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 32px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
    color: #4b5563;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.gl-inquiry-btn:hover {
    border-color: #10803B;
    color: #10803B;
}

.gl-inquiry-btn.selected {
    border-color: #10803B;
    background: rgba(16, 128, 59, 0.05);
    color: #10803B;
}

.gl-inquiry-icon {
    display: flex;
    align-items: center;
}

.gl-inquiry-selection {
    margin-top: 40px;
    font-size: 18px;
    font-weight: 500;
    color: #10803B;
    font-style: italic;
}

/* ===== PI Callback Step ===== */
.gl-pi-callback {
    text-align: center;
    padding: 40px 32px;
}

.gl-pi-callback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #10803B 0%, #75C829 100%);
    border-radius: 50%;
    color: #ffffff;
    margin-bottom: 28px;
}

.gl-pi-callback-icon svg {
    width: 48px;
    height: 48px;
}

.gl-pi-callback .gl-step-title {
    color: #10803B;
    margin-bottom: 16px;
}

.gl-pi-callback-message {
    font-size: 20px;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 28px;
}

.gl-pi-callback-message strong {
    color: #10803B;
}

.gl-pi-callback-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px 36px;
    margin-bottom: 24px;
}

.gl-pi-callback-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.gl-pi-callback-number {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.5px;
}

.gl-pi-callback-status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 24px;
    color: #6b7280;
}

.gl-pi-callback-confirmed {
    background: rgba(16, 128, 59, 0.08);
    color: #10803B;
}

.gl-pi-callback-error {
    background: #fef2f2;
    color: #dc2626;
}

.gl-pi-callback-contact {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

/* ===== Insurance Info Step ===== */
.gl-insurance-form {
    background: #f9fafb;
    border-radius: 10px;
    padding: 28px;
}

.gl-insurance-form .gl-form-group {
    margin-bottom: 20px;
}

.gl-insurance-form .gl-form-group:last-child {
    margin-bottom: 0;
}

.gl-insurance-search-container {
    position: relative;
}

.gl-insurance-search-spinner {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.gl-insurance-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 50;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.gl-insurance-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.1s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gl-insurance-option:hover {
    background: rgba(16, 128, 59, 0.08);
}

.gl-insurance-option.selected {
    font-weight: 600;
    color: #10803B;
}

.gl-insurance-option-name {
    font-size: 16px;
    color: #1f2937;
}

.gl-insurance-option-detail {
    font-size: 13px;
    color: #6b7280;
}

.gl-insurance-option-header {
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    list-style: none;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
}

.gl-insurance-option-empty {
    padding: 16px 20px;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    list-style: none;
}

.gl-insurance-selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(16, 128, 59, 0.08);
    color: #10803B;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.gl-policyholder-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* ===== Responsive Design ===== */
@media (max-width: 640px) {
    .gl-scheduler {
        padding: 24px;
        border-radius: 0;
        box-shadow: none;
    }

    .gl-progress-steps {
        gap: 4px;
    }

    .gl-step-label {
        font-size: 11px;
    }

    .gl-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .gl-step-title {
        font-size: 26px;
    }

    .gl-step-description {
        font-size: 16px;
    }

    .gl-form-grid {
        grid-template-columns: 1fr;
    }

    .gl-patient-toggle {
        flex-direction: column;
    }

    .gl-search-form {
        grid-template-columns: 1fr;
    }

    .gl-search-btn-group .gl-btn {
        width: 100%;
        height: auto;
    }

    .gl-time-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gl-step-actions {
        flex-direction: column-reverse;
    }

    .gl-step-actions .gl-btn {
        width: 100%;
    }

    .gl-detail-item {
        flex-direction: column;
        gap: 4px;
    }

    .gl-detail-item dd {
        text-align: left;
    }

    .gl-result-details {
        flex-direction: column;
        gap: 4px;
    }

    .gl-inquiry-options {
        flex-direction: column;
    }
}

/* ===== Focus Styles for Accessibility ===== */
.gl-btn:focus-visible,
.gl-input:focus-visible,
.gl-select:focus-visible,
.gl-toggle-btn:focus-visible,
.gl-inquiry-btn:focus-visible,
.gl-date-btn:focus-visible,
.gl-time-btn:focus-visible,
.gl-patient-result:focus-visible {
    outline: 3px solid #10803B;
    outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .gl-spinner,
    .gl-spinner-small {
        animation: none;
    }

    .gl-step-content {
        animation: none;
    }

    .gl-btn,
    .gl-toggle-btn,
    .gl-inquiry-btn,
    .gl-date-btn,
    .gl-time-btn,
    .gl-patient-result {
        transition: none;
    }
}

/* ===== Validation Error Styles ===== */
.gl-input-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
}

.gl-input-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.gl-field-error {
    display: block;
    color: #dc2626;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
}

.gl-validation-summary {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.gl-validation-summary h4 {
    color: #dc2626;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gl-validation-summary ul {
    list-style: disc;
    padding-left: 20px;
    color: #991b1b;
    font-size: 14px;
}

.gl-validation-summary li {
    margin-bottom: 4px;
}

/* ----- Member ID input: format hint, validity badge, confusable nudge ----- */

.gl-mid-wrapper {
    position: relative;
}

.gl-mid-wrapper .gl-mid-validity {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
}

.gl-mid-validity.gl-mid-valid svg {
    color: #16a34a;
}

.gl-mid-validity.gl-mid-invalid svg {
    color: #dc2626;
}

.gl-mid-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
}

.gl-mid-hint .gl-mid-hint-example {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #374151;
}

.gl-mid-confusable {
    margin-top: 6px;
    padding: 8px 10px;
    background: #fffbea;
    border-left: 3px solid #f5b300;
    border-radius: 4px;
    font-size: 13px;
    color: #6b4f00;
}

.gl-input-padded-right {
    padding-right: 40px;
}

.gl-label-optional {
    color: #6b7280;
    font-weight: 400;
    margin-left: 6px;
    font-size: 14px;
}
