/* Serenity HeadSpa - Brand Booking System Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Lato:wght@300;400;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #F5F0E8;
    --secondary: #3D4C5A;
    --accent: #C0A062;
    --accent-semi-dark: #A68B52;
    --white: #FFFFFF;
    --text-color: #3D4C5A;

    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;

    /* Mobile scales */
    --scale-mobile: 1.25;
    --heading-size-mobile: 18px;
    --body-size-mobile: 18px;

    /* Desktop scales */
    --scale-desktop: 1.33;
    --heading-size-desktop: 19px;
    --body-size-desktop: 16px;
}

/* ===== GLOBAL STYLES ===== */
.serenity-booking {
    font-family: var(--font-body);
    font-size: var(--body-size-mobile);
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--primary);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(61, 76, 90, 0.1);
}

@media (min-width: 768px) {
    .serenity-booking {
        font-size: var(--body-size-desktop);
    }
}

.step-container {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(61, 76, 90, 0.08);
    transition: all 0.3s ease;
}

.step-container.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 76, 90, 0.12);
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary);
}

.step-number {
    background: var(--secondary);
    color: var(--white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 16px;
}

.step-title {
    font-family: var(--font-heading);
    font-size: var(--heading-size-mobile);
    color: var(--text-color);
    margin: 0;
    font-weight: 600;
}

@media (min-width: 768px) {
    .step-title {
        font-size: var(--heading-size-desktop);
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    font-weight: 600;
}

h1 { font-size: calc(var(--heading-size-mobile) * var(--scale-mobile) * var(--scale-mobile)); }
h2 { font-size: calc(var(--heading-size-mobile) * var(--scale-mobile)); }
h3 { font-size: var(--heading-size-mobile); }

@media (min-width: 768px) {
    h1 { font-size: calc(var(--heading-size-desktop) * var(--scale-desktop) * var(--scale-desktop)); }
    h2 { font-size: calc(var(--heading-size-desktop) * var(--scale-desktop)); }
    h3 { font-size: var(--heading-size-desktop); }
}

.step-title-old {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

/* ===== LOCATION PICKER ===== */
.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.location-card {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.location-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192, 160, 98, 0.15);
}

.location-card.selected {
    border-color: var(--secondary);
    background: var(--secondary);
    color: var(--white);
}

.location-card.closest {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--white);
}

.location-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.location-icon {
    font-size: 24px;
    margin-right: 10px;
}

.location-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.location-address {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.4;
}

.location-distance {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

.location-map {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
}

.geolocation-status {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.geolocation-status.detecting {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.geolocation-status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.geolocation-status.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ===== CATEGORY GRID ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.category-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.category-card.selected .category-icon {
    transform: scale(1.1);
}

.category-card.selected .category-name,
.category-card.selected .category-count {
    color: white;
}

/* Service card selection styles */
.service-card.selected {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 76, 90, 0.3);
}

.service-card.selected .service-name,
.service-card.selected .service-duration,
.service-card.selected .service-price {
    color: var(--white);
}

/* Removed duplicate - already defined above */

.category-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-count {
    font-size: 12px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
}

.loading-count {
    color: #007bff;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* ===== SERVICES GRID ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.service-card {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 160, 98, 0.15);
}

/* Removed duplicate - already defined above */

.service-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.service-price {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 5px;
}

/* Removed duplicate - already defined above */

/* ===== LOADING & ERROR STATES ===== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    font-size: 16px;
    color: #6c757d;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffcdd2;
    text-align: center;
    margin: 20px 0;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== BUTTONS ===== */
.bricks-button, .btn-primary {
    background-color: var(--secondary);
    color: var(--white);
    border-width: 0;
    padding: .6em 1em;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: .5px;
    text-align: center;
    text-decoration: none;
    width: 100%;
    margin-top: 10px;
}

.bricks-button.lg, .btn-primary.lg {
    font-size: 1.1em;
    padding: .6em 1em;
}

.bricks-button.circle, .btn-primary.circle {
    border-radius: 100px !important;
}

.bricks-button:hover, .btn-primary:hover {
    background-color: var(--accent-semi-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 160, 98, 0.3);
}

.bricks-button:disabled, .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-secondary:hover {
    background: var(--accent-semi-dark);
    transform: translateY(-1px);
}

/* Back button specific styles */
.back-button {
    margin-left: auto;
    margin-top: 0;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.back-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

/* Step header layout for back button */
.step-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.step-header .step-number {
    flex-shrink: 0;
}

.step-header .step-title {
    flex: 1;
    margin: 0;
}

.step-header .back-button {
    margin-left: auto;
    margin-top: 0;
}

/* ===== BOOKING SUMMARY ===== */
.booking-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.booking-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 16px;
    color: #2c3e50;
}

.summary-item strong {
    color: #495057;
}

/* ===== TIME SLOTS ===== */
.calendar-container {
    margin-top: 20px;
}

.date-section {
    margin-bottom: 30px;
}

.date-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    text-transform: capitalize;
}

/* Doctor sections */
.doctor-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.doctor-name {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.time-slot {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.time-slot:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.time-slot.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .serenity-booking {
        padding: 15px;
        margin: 10px;
    }
    
    .step-container {
        padding: 20px;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .location-map {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
