:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: #eff6ff;
    --secondary-color: #6b7280;
    --accent-color: #059669;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --border-radius: 6px;
    --border-radius-lg: 8px;
    --transition: all 0.15s ease-in-out;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--neutral-50);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--neutral-700);
    margin: 0;
    padding: 0;
}

.container-fluid {
    padding: 0;
}

.wizard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 0;
}

.main-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
}

.main-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--neutral-900);
    letter-spacing: -0.025em;
}

.main-header .lead {
    font-size: 16px;
    color: var(--neutral-600);
    margin: 0;
    font-weight: 400;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    position: relative;
    background: white;
    padding: 10px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

/* .step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--neutral-200);
    z-index: 1;
} */

.step {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    margin: 0px;
    position: relative;
    z-index: 2;
    min-width: 25%;
    gap: .5rem;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    background: var(--neutral-100);
    color: var(--neutral-500);
    border: 2px solid var(--neutral-200);
}

.step-text {
    font-weight: 500;
    font-size: 13px;
    color: var(--neutral-500);
    transition: var(--transition);
    text-align: center;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.step.active .step-text {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step.completed .step-text {
    color: var(--success-color);
    font-weight: 600;
}

.step-content {
    display: none;
}

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

.card {
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    background: white;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    padding: 15px 20px;
}

.card-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
    color: var(--neutral-900);
}

.card-body {
    padding: 20px;
}

.speciality-card, .doctor-card {
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    background: white;
    margin-bottom: 16px;
}

.speciality-card:hover, .doctor-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.speciality-card.selected, .doctor-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-bg);
    box-shadow: var(--shadow-md);
}

.speciality-card .card-body, .doctor-card .card-body {
    padding: 15px;
    text-align: center;
}

.speciality-card i {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 32px;
}

.speciality-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--neutral-900);
}

.speciality-card p {
    font-size: 13px;
    color: var(--neutral-600);
    margin: 0;
    line-height: 1.4;
}

.doctor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--neutral-200);
    margin-bottom: 12px;
}

.doctor-card h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--neutral-900);
}

.doctor-card .card-text {
    font-size: 13px;
    color: var(--neutral-600);
    margin-bottom: 8px;
}

.doctor-card small {
    font-size: 12px;
    color: var(--neutral-500);
}

.calendar-container {
    min-height: 500px;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    background: white;
    overflow: hidden;
}

.time-slot {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    margin: 2px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 12px;
    color: var(--neutral-700);
}

.time-slot:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.time-slot.booked {
    background: var(--neutral-100);
    border-color: var(--neutral-300);
    color: var(--neutral-400);
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.spinner-border {
    color: var(--primary-color);
    width: 24px;
    height: 24px;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 0;
}

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    transition: var(--transition);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--neutral-100);
    border-color: var(--neutral-300);
    color: var(--neutral-700);
}

.btn-secondary:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-400);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-light {
    border-color: var(--neutral-300);
    color: var(--neutral-600);
    background: transparent;
    font-size: 12px;
    padding: 6px 12px;
}

.btn-outline-light.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-light:hover:not(.active) {
    background: var(--neutral-100);
    border-color: var(--neutral-400);
}

.alert-info {
    background: var(--primary-bg);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    font-size: 14px;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid var(--success-color);
    color: #166534;
    border-radius: var(--border-radius);
    padding: 12px 16px;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid var(--danger-color);
    color: #991b1b;
    border-radius: var(--border-radius);
    padding: 12px 16px;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    padding: 20px 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    background: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
    padding: 16px 24px;
}

.form-control {
    border: 1px solid var(--neutral-300);
    border-radius: var(--border-radius);
    padding: 10px 12px;
    transition: var(--transition);
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--neutral-700);
    margin-bottom: 6px;
    font-size: 14px;
}

.calendar-nav-btn {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: var(--border-radius);
    padding: 6px 12px;
    color: var(--neutral-700);
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--neutral-200);
    border-color: var(--neutral-400);
}

.btn.submit-appointment {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 13px;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
}

.language-selector .dropdown-toggle {
    background: white;
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 8px 12px;
    font-size: 13px;
    transition: var(--transition);
}

.language-selector .dropdown-toggle:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
}

.language-selector .dropdown-menu {
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    background: white;
    padding: 4px;
    margin-top: 4px;
}

.language-selector .dropdown-item {
    padding: 8px 12px;
    font-weight: 500;
    transition: var(--transition);
    border-radius: var(--border-radius);
    margin: 0;
    font-size: 13px;
    color: var(--neutral-700);
}

.language-selector .dropdown-item:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

.language-selector .dropdown-item img {
    width: 16px;
    height: auto;
}

.success-animation i {
    font-size: 48px;
    color: var(--success-color);
}

#calendar-date-range {
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-900);
}

.btn-group .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* RTL Support */
[dir="rtl"] *:not(.fas){
    font-family: 'kurdish' !important;
}
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .modal-header .btn-close{
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-radius: var(--bs-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: calc(-1 * var(--bs-border-width));
}

[dir="rtl"] .input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3), 
[dir="rtl"] .input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control, 
[dir="rtl"] .input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-select, 
[dir="rtl"] .input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating) {
    border-radius: var(--border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* [dir="rtl"] .step-indicator {flex-direction: row-reverse;} */

[dir="rtl"] .wizard-navigation{
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-group>.btn-group:not(:last-child)>.btn, 
[dir="rtl"] .btn-group>.btn.dropdown-toggle-split:first-child, 
[dir="rtl"] .btn-group>.btn:not(:last-child):not(.dropdown-toggle) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

[dir="rtl"] .btn-group>.btn-group:not(:first-child)>.btn, 
[dir="rtl"] .btn-group>.btn:nth-child(n+3), 
[dir="rtl"] .btn-group>:not(.btn-check)+.btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}


[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .me-2, [dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

[dir="rtl"] .ms-2, [dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

@media (max-width: 768px) {
    .wizard-container {
        padding: 16px;
    }
    
    .main-header {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .main-header h1 {
        font-size: 24px;
    }
    
    .step-indicator {
        padding: 16px;
        margin: 24px 0;
    }
    
    .step {
        margin: 0 20px;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .card-body {
        padding: 20px 16px;
    }
    
    .speciality-card .card-body, .doctor-card .card-body {
        padding: 16px;
    }
    
    .modal-body {
        padding: 20px 16px;
    }
    
    .language-selector {
        position: static;
        margin-bottom: 16px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .step {
        margin: 0 8px;
    }
    
    .step-text {
        font-size: 11px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

.sp-1 {
    width: 0.5rem;
    height: 100%;
}

.sp-2 {
    width: 1rem;
    height: 100%;
}

.sp-3 {
    width: 1.5rem;
    height: 100%;
}

.sp-4 {
    width: 2rem;
    height: 100%;
}

/* inline calendar style*/
.inline-calendar-container {
    max-width: 100% /*360px*/;
    margin: 0 auto;
    font-family: 'adobe-clean', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.calendar-widget {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 10px 20px; */
    padding: 0;
    background: var(--primary-color);
    color: white;
    position: relative;
}

.calendar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-color);
}

.calendar-header > * {
    position: relative;
    z-index: 1;
}

.calendar-header button {
    background-color: transparent;
    /* background: rgba(255, 255, 255, 0.2); */
    /* border: 1px solid rgba(255, 255, 255, 0.3); */
    color: var(--primary-bg);
    font-size: 1.2rem;
    padding: 15px 20px;
    border-radius: 0px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    /* max-width: 60px; */
}

.calendar-header button:hover {
    /* background: rgba(255, 255, 255, 0.3); */
    /* border-color: rgba(255, 255, 255, 0.5); */
    /* transform: translateY(-1px); */
    border-color: transparent;
    background-color: var(--primary-dark);
}

.calendar-month-year {
    font-weight: 600;
    /* flex-grow: 2fr; */
    font-size: 18px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.calendar-grid {
    padding: 24px;
    background: #fafafa;
}

.calendar-day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    font-weight: 700;
    color: #6e6e6e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: white;
    border: 1px solid transparent;
    color: #323232;
}

.calendar-day:not(.disabled):not(.empty):hover {
    background: #f0f0f0;
    border-color: #d4d4d4;
    transform: translateY(-1px);
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    color: #323232;
}

.calendar-day.selected,.calendar-day.selected:hover {
    /* background: #2463eb; */
    /* color: white; */
    /* border-color: #3b82f6; */
    transform: translateY(-1px);
    font-weight: 600;
    border-color: var(--primary-color);
    background: var(--primary-bg);
    box-shadow: var(--shadow-md);
}

.calendar-day.today {
    /* border: 1px solid #3b82f6aa; */
    font-weight: 700;
    color: var(--primary-dark);
}

.calendar-day.disabled {
    color: #b8b8b8;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: transparent;
}

.calendar-day.disabled:hover {
    transform: none;
    box-shadow: none;
    background: #f5f5f5;
    border-color: transparent;
}

.calendar-day.empty {
    cursor: default;
    background: transparent;
}

.calendar-day.empty:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    border-color: transparent;
}

/* Add subtle animation to the entire widget */
.calendar-widget {
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Adobe-style focus states with blue theme */
.calendar-day:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.calendar-header button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.time-slot-btn{
    font-size: 1rem;
    border-radius: 1.5rem;
    border-color: var(--primary-color);
    /* background-color: var(--primary-color); */
    /* color: var(--primary-bg); */
}

/* Dark mode support (optional) */
/* @media (prefers-color-scheme: dark) {
    .calendar-widget {
        background: #1f2937;
        border-color: #374151;
    }
    
    .calendar-header {
        background: #111827;
        border-color: #374151;
    }
    
    .calendar-month-year {
        color: #f9fafb;
    }
    
    .calendar-header button {
        background: #374151;
        border-color: #4b5563;
        color: #d1d5db;
    }
    
    .calendar-header button:hover {
        background: #4b5563;
        border-color: #6b7280;
        color: #f3f4f6;
    }
    
    .calendar-grid {
        background: #1f2937;
    }
    
    .calendar-day {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .calendar-day:not(.disabled):not(.empty):hover {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .calendar-day.disabled {
        background: #1f2937;
        color: #6b7280;
    }
    
    .day-header {
        color: #9ca3af;
    }
} */

/* RTL Support */
[dir="rtl"] .calendar-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .calendar-day-headers,
[dir="rtl"] .calendar-days {
    direction: ltr;
}

/* Mobile responsiveness with Adobe's approach */
@media (max-width: 768px) {
    .inline-calendar-container {
        max-width: 100%;
    }
    
    .calendar-header {
        padding: 16px 20px;
    }
    
    .calendar-month-year {
        font-size: 16px;
    }
    
    .calendar-grid {
        padding: 20px;
    }
    
    .calendar-day {
        font-size: 13px;
    }
    
    .day-header {
        font-size: 11px;
        padding: 10px 6px;
    }
}

@media (max-width: 480px) {
    .calendar-header {
        padding: 14px 16px;
    }
    
    .calendar-grid {
        padding: 16px;
    }
    
    .calendar-day {
        font-size: 11px;
    }
    
    .day-header {
        font-size: 10px;
        padding: 8px 4px;
    }
}