/* Service Detail Page Specific Styles */
/* Uses variables and classes from base.css */

/* Service Header - Unique to this page */
.service-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-xl);
    color: var(--color-white);
    margin-bottom: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.service-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.service-description {
    font-size: var(--font-size-lg);
    opacity: 0.95;
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.price-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-amount {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-xs);
}

.price-duration {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* Service Grid Layout - Specific to service pages */
.service-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-md);
    scroll-behavior: smooth;      /* Smooth scrolling for better UX */
}

.service-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    align-items: start;
}

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .sidebar {
        order: -1;                    /* Show sidebar first on mobile */
        position: static;             /* Don't stick on mobile */
        max-height: none;             /* Remove height restriction */
        margin-bottom: var(--space-lg);
    }
}

/* Sidebar - Sticky positioning that follows when scrolling */
.sidebar {
    background: var(--color-white);
    position: sticky;
    top: 2rem;                    /* Distance from top when stuck */
    height: fit-content;
    max-height: calc(100vh - 40px); /* Don't exceed viewport height */
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-100);
    z-index: 10;                  /* Stay above other content */
    overflow-y: auto;             /* Allow scrolling if content is too tall */
    transition: all 0.2s ease;    /* Smooth transitions */
}

/* Visual enhancement when sidebar is actively sticky */
.sidebar:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Service Detail Cards - Override base cards for service content */
.service-card {
    /* Uses .card-base from base.css but adds service-specific styles */
    margin-bottom: var(--space-lg);
}

/* Staff Notice - Service specific */
.staff-notice {
    display: none;
    font-size: var(--font-size-xs);
    color: var(--color-success);
    font-weight: var(--font-weight-normal);
    margin-left: var(--space-md);
}

/* Calendar/Legend - Service booking specific */
.legend-container {
    background: var(--color-gray-50);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-gray-200);
}

.legend-title {
    text-align: center;
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-gray-600);
    font-weight: var(--font-weight-semibold);
}

.legend-row {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.legend-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
}

.legend-badge-morning {
    background: #fff4e6;
    border: 1px solid #ffa500;
}

.legend-badge-afternoon {
    background: #f0f4ff;
    border: 1px solid var(--color-primary);
}

.legend-text {
    color: var(--color-gray-700);
}

/* Service Details Grid - Specific to service info */
.details-grid {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-gray-200);
}

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

.detail-label {
    color: var(--color-gray-600);
}

.detail-value {
    font-weight: var(--font-weight-medium);
}

.detail-value-primary {
    font-weight: var(--font-weight-medium);
    color: var(--color-primary);
}

.detail-value-success {
    font-weight: var(--font-weight-medium);
    color: var(--color-success);
}

.detail-value-warning {
    font-weight: var(--font-weight-medium);
    color: var(--color-warning);
}

.detail-value-secondary {
    font-weight: var(--font-weight-medium);
    color: var(--color-gray-500);
}

/* Service Specific Buttons - Complete styling */
.btn-book {
    display: block;
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-book:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
    text-decoration: none;
}

.btn-login {
    display: block;
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-success);
    color: var(--color-white);
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
    text-decoration: none;
}

/* ===== METHOD 3 EXAMPLES: CONFIGURABLE BUTTONS ===== */
/* These show how to theme the .btn-configurable class */

.btn-book-method3 {
    /* Override CSS custom properties to create a blue book button */
    --btn-bg: var(--color-primary);
    --btn-bg-hover: var(--color-primary-hover);
    --btn-color: var(--color-white);
    --btn-width: 100%;
    --btn-display: block;
    --btn-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-login-method3 {
    /* Override CSS custom properties to create a green login button */
    --btn-bg: var(--color-success);
    --btn-bg-hover: var(--color-success-hover);
    --btn-color: var(--color-white);
    --btn-width: 100%;
    --btn-display: block;
    --btn-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-danger-method3 {
    /* Example: Red danger button */
    --btn-bg: var(--color-danger);
    --btn-bg-hover: #b91c1c;
    --btn-color: var(--color-white);
    --btn-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Staff Section Styles */
.staff-header {
    color: #333;
    margin-bottom: 1rem;
}

.staff-choice-notice {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #28a745;
}

.staff-choice-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.staff-selection-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.staff-card {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.staff-card:hover {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.staff-card.selected {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.staff-card.selected:hover {
    background: linear-gradient(135deg, #ddd6fe, #c7d2fe);
}

.staff-selected {
    display: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.staff-card.selected .staff-selected {
    display: block !important;
}

.staff-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.staff-availability {
    font-size: 0.9rem;
    color: #666;
}

.staff-radio-button {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-radio-selected {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    display: none;
}

/* Auto-assigned staff styles */
.staff-required-notice {
    background: #fff3e0;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ffc107;
}

.staff-required-text {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.staff-list-container {
    display: grid;
    gap: 1rem;
}

.staff-list-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
}

.staff-list-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.staff-list-info {
    flex: 1;
}

.staff-list-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.staff-list-schedule {
    font-size: 0.85rem;
    color: #666;
}

.staff-schedule-title {
    font-weight: bold;
}

.staff-schedule-days {
    margin-top: 0.3rem;
}

.staff-schedule-day {
    display: inline-block;
    background: white;
    padding: 0.2rem 0.5rem;
    margin: 0.1rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.staff-available-badge {
    background: #28a745;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Availability Calendar Styles */
.availability-summary {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.calendar-week-section {
    margin-bottom: 2rem;
}

.calendar-week-title {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.calendar-week-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.calendar-time-labels {
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0.5rem;
}

.time-label {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
}

.time-label-morning {
    background: #fff4e6;
    border-color: #ffa500;
    color: #bf6000;
}

.time-label-afternoon {
    background: #f0f4ff;
    border-color: #667eea;
    color: #4c5dc4;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto auto;
    gap: 0.5rem;
}

/* Service Hours Info */
.service-hours-container {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.service-hours-title {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.service-hours-grid {
    display: grid;
    gap: 0.3rem;
}

.service-hours-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.service-hours-time {
    color: #666;
}

/* Smart Booking System */
.smart-booking-container {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.smart-booking-title {
    color: #28a745;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.smart-booking-text {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* Back to Services Link */
.back-to-services {
    text-align: center;
    margin-top: 1rem;
}

.back-to-services-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-to-services-link:hover {
    color: #5a67d8;
    text-decoration: none;
}

/* Service Specific Notices */
.staff-selection-notice {
    text-align: center;
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background: #e8f5e8;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    display: none;
}

.login-notice {
    text-align: center;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--color-gray-50);
    border-radius: var(--radius-lg);
}

.login-notice-text {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
    margin: 0;
}
