/**
 * client.css - Custom Styling for client booking application
 * Implements rich aesthetics, premium interactions, and responsive design.
 */

:root {
    --primary-color: #03217A;
    --primary-dark: #011654;
    --primary-light: rgba(3, 33, 122, 0.08);
    --secondary-color: #FF952F;
    --bg-solid: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #0c152b;
    --text-muted: #5e6d82;
    --border-color: rgba(3, 33, 122, 0.12);
    --shadow-premium: 0 20px 25px -5px rgba(3, 33, 122, 0.05), 0 10px 10px -5px rgba(3, 33, 122, 0.02);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-solid);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 50px;
}

/* Header & Branding */
.navbar-brand-custom {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

.brand-icon {
    color: var(--primary-color);
}

/* Glassmorphic Portal Container */
.booking-container {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Floating Step Indicators */
.step-progressbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0;
    margin: 0 0 40px 0;
    list-style: none;
}

.step-progressbar::before {
    content: '';
    position: absolute;
    top: 21px; /* perfectly vertically centered on the 42px circles */
    left: 12.5%;
    width: 75%;
    height: 4px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
}

.step-progressbar-fill {
    position: absolute;
    top: 21px; /* perfectly vertically centered on the 42px circles */
    left: 12.5%;
    width: 0%;
    height: 4px;
    background: var(--primary-color);
    transform: translateY(-50%);
    z-index: 2;
    transition: width 0.4s ease;
}

.step-item {
    flex: 1; /* Make all items equal width */
    position: relative;
    z-index: 3;
    text-align: center;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #e2e8f0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    transition: all 0.4s ease;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.step-item.active .step-circle {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: #ffffff;
}

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

.step-item.completed .step-circle {
    background: var(--primary-color);
    border-color: transparent;
    color: #ffffff;
}

.step-item.completed .step-label {
    color: var(--primary-color);
}

/* Category Selection Screen */
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--primary-color);
    color: #ffffff;
    transform: rotate(6deg) scale(1.05);
}

.category-title {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.category-description {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.category-meta i {
    color: var(--primary-color);
}

.btn-book-now {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    background: #f1f5f9;
    color: #475569;
}

.category-card:hover .btn-book-now {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(3, 33, 122, 0.25);
}

/* Multi-Step Flow Layout */
.booking-step-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.booking-step-panel.active {
    display: block;
}

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

/* Two Column Scheduler Layout */
.scheduler-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .scheduler-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.calendar-section {
    padding: 25px;
    border-right: 1px solid var(--border-color);
}

@media (max-width: 991.98px) {
    .calendar-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

.slots-section {
    padding: 25px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}

/* FullCalendar Customizations */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.fc .fc-button {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: none;
    transition: all 0.2s ease;
    border-radius: 8px !important;
}

.fc .fc-button:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.fc .fc-button-primary:not(:disabled).fc-button-active, 
.fc .fc-button-primary:not(:disabled):active {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.fc .fc-col-header-cell-cushion {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 10px 0 !important;
    text-decoration: none !important;
}

.fc-daygrid-day-number {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none !important;
    padding: 6px 8px !important;
}

.fc-day {
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Highlight available business days */
.fc-day:not(.fc-day-disabled) {
    background-color: #ffffff;
}

/* Hover effects for days */
.fc-daygrid-day:hover:not(.fc-day-disabled) {
    background-color: var(--primary-light) !important;
}

.fc-daygrid-day.selected-date {
    background-color: var(--primary-color) !important;
}

.fc-daygrid-day.selected-date .fc-daygrid-day-number {
    color: #ffffff !important;
    font-weight: 600;
    background: var(--primary-color);
    border-radius: 50%;
    display: inline-block;
    min-width: 26px;
    text-align: center;
}

/* Disabled days style (blocked holidays or non-working days) */
.fc-day-disabled {
    background-color: #f1f5f9 !important;
    opacity: 0.55;
    cursor: not-allowed !important;
}

.fc-day-disabled .fc-daygrid-day-number {
    color: #cbd5e1 !important;
}

/* Time Slots Grid */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 5px;
}

.slot-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.slot-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.1);
}

.slot-btn.active {
    background: var(--secondary-color) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 10px rgba(255, 149, 47, 0.3);
}

.slot-btn:disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.6;
}

/* Timezone display */
.timezone-wrapper {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Custom form inputs */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-control {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-floating > .form-control {
    border-radius: 10px;
}

/* Confirmation Checkmark */
.success-checkmark-svg {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px auto;
    display: block;
}

.path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 1.5s ease-in-out forwards;
}

.check {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash-check 1.2s 0.35s ease-in-out forwards;
}

@keyframes dash {
    to { stroke-dashoffset: 0; }
}

@keyframes dash-check {
    to { stroke-dashoffset: 940; }
}

/* Loading animations */
.slot-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: var(--text-muted);
}

/* Premium Confirmation Hero Styles */
.confirmation-hero {
    margin-top: 15px;
}

.confirmation-logo {
    height: 65px;
    object-fit: contain;
    animation: bounceSubtle 3s ease-in-out infinite;
}

.success-checkmark-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

@keyframes bounceSubtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
