/* The Athenians Barber Shop - Customer Booking Styles */
/* Mobile-First Design */

:root {
    /* Brand Colors from theatheniansbarbers.gr */
    --primary-dark: #1a1e21;
    --primary-olive: #808000;
    --cream: #ece8e3;
    --gray-dark: #484b4d;
    --gray-top: #636363;

    /* Text Colors */
    --text-primary: #222222;
    --text-secondary: #575760;
    --text-muted: #b2b2be;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f7f8f9;
    --bg-cream: #ece8e3;

    /* Functional Colors */
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --border-color: #dcdde1;

    /* Effects */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Header - Mobile First */
header {
    background: var(--primary-dark);
    padding: 20px 15px;
    text-align: center;
    z-index: 100;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 80px;
    height: auto;
    border-radius: 50%;
}

.header-info h1 {
    color: var(--cream);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-info .subtitle {
    color: var(--primary-olive);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Business Info Bar */
.business-info-bar {
    background: var(--gray-top);
    padding: 10px 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.business-info-bar a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.business-info-bar a:hover {
    color: var(--primary-olive);
}

/* Progress Steps - Mobile */
.progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 20px 15px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

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

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 15px;
    left: 60%;
    width: 80%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 0;
}

.step.completed:not(:last-child)::after {
    background-color: var(--primary-olive);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.step.active .step-number,
.step.completed .step-number {
    background-color: var(--primary-olive);
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--primary-dark);
}

/* Booking Steps */
.booking-step {
    display: none;
    background: var(--bg-white);
    padding: 20px 15px;
    min-height: calc(100vh - 250px);
}

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

.booking-step h2 {
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-size: 1.3rem;
    text-align: center;
}

/* Barbers Grid - Mobile First */
.barbers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.barber-card {
    background: var(--bg-light);
    border: 3px solid transparent;
    border-radius: var(--radius);
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.barber-card:hover {
    border-color: var(--primary-olive);
    transform: translateY(-2px);
}

.barber-card.selected {
    border-color: var(--primary-olive);
    background: var(--cream);
}

.barber-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-dark);
    background-size: cover;
    background-position: center;
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5rem;
    font-weight: bold;
    overflow: hidden;
}

.barber-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.barber-name {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

/* Services List - Mobile */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--bg-light);
    border: 3px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-item:hover {
    border-color: var(--primary-olive);
}

.service-item.selected {
    border-color: var(--primary-olive);
    background: var(--cream);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.service-item.selected .service-checkbox {
    background-color: var(--primary-olive);
    border-color: var(--primary-olive);
    color: white;
}

.service-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-dark);
}

.service-duration {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.services-summary {
    padding: 15px;
    background: var(--cream);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
    border: 2px solid var(--primary-olive);
}

/* Calendar - Mobile */
.calendar-container {
    margin-bottom: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.calendar-header span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
    color: var(--primary-dark);
}

.btn-icon:hover {
    background: var(--cream);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

.calendar-weekdays span {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 8px 0;
}

.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;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--primary-olive);
    color: white;
}

.calendar-day.disabled {
    color: var(--border-color);
    cursor: not-allowed;
}

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

.calendar-day.available {
    background: #e8f5e9;
    color: var(--success-color);
}

.calendar-day.selected {
    background: var(--primary-olive);
    color: white;
}

.calendar-day.today {
    border: 2px solid var(--primary-olive);
}

/* Time Slots - Mobile */
.time-slots-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.time-slots-container h3 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--primary-dark);
    text-align: center;
}

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

.time-slot {
    padding: 14px 10px;
    text-align: center;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

/* Booking Form - Mobile */
.booking-summary {
    background: var(--cream);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-olive);
}

.booking-summary h3 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--primary-dark);
}

.booking-summary p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.booking-summary strong {
    color: var(--primary-dark);
}

.booking-form .form-group {
    margin-bottom: 18px;
}

.booking-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.booking-form input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.booking-form input:focus {
    outline: none;
    border-color: var(--primary-olive);
}

/* Buttons - Mobile */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary:hover:not(:disabled) {
    background: #6b6b00;
}

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

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--cream);
    border-color: var(--primary-olive);
}

.step-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

/* Confirmation - Mobile */
.confirmation-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
}

.confirmation-message h2 {
    color: var(--success-color);
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.confirmation-message > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    padding: 25px 15px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.footer-logo {
    border-radius: 50%;
    width: 60px;
}

.footer-info {
    color: var(--cream);
    font-size: 0.85rem;
}

.footer-info p {
    margin-bottom: 5px;
}

.footer-info a {
    color: var(--primary-olive);
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--cream);
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-olive);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 30, 33, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-dark);
    border-top-color: var(--primary-olive);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--cream);
    font-size: 0.95rem;
}

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

/* Error/Toast Message */
.error-message {
    position: fixed;
    bottom: 20px;
    left: 15px;
    right: 15px;
    background: var(--error-color);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    text-align: center;
    font-weight: 500;
}

/* ==================== */
/* TABLET STYLES (600px+) */
/* ==================== */
@media (min-width: 600px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
    }

    header {
        padding: 25px 20px;
    }

    .header-content {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
    }

    .logo {
        width: 90px;
    }

    .header-info h1 {
        font-size: 1.5rem;
    }

    .booking-step {
        padding: 30px 25px;
    }

    .booking-step h2 {
        font-size: 1.5rem;
    }

    .barbers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .barber-avatar {
        width: 80px;
        height: 80px;
    }

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

    .step-actions {
        flex-direction: row;
        justify-content: space-between;
    }

    .step-actions .btn {
        width: auto;
        min-width: 140px;
    }

    .step-label {
        font-size: 0.75rem;
    }
}

/* ==================== */
/* DESKTOP STYLES (900px+) */
/* ==================== */
@media (min-width: 900px) {
    .container {
        max-width: 800px;
    }

    header {
        padding: 30px;
    }

    .logo {
        width: 100px;
    }

    .header-info h1 {
        font-size: 1.7rem;
    }

    .header-info .subtitle {
        font-size: 0.95rem;
    }

    .progress-steps {
        padding: 25px 40px;
    }

    .step-number {
        width: 36px;
        height: 36px;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .booking-step {
        padding: 40px;
        min-height: auto;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .booking-step h2 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .barbers-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .barber-avatar {
        width: 90px;
        height: 90px;
    }

    .barber-name {
        font-size: 1rem;
    }

    .service-item {
        padding: 18px 20px;
    }

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

    .footer {
        padding: 35px 30px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        max-width: 800px;
        margin: 0 auto;
    }

    .footer-info {
        text-align: left;
    }
}
