/* Appointment Booking Styles */
:root {
    --primary: #1a1a1a;
    --primary-hover: #333;
    --accent: #e91e63;
    --accent-light: #fce4ec;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --text: #1a1a1a;
    --text-secondary: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f0f0;
    --border: #e0e0e0;
    --border-light: #eee;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --transition: all 0.2s ease;
}

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

/* Utility */
.hidden {
    display: none !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.5;
}

/* Layout */
.appointment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.step-dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

.step-dot.completed {
    background: var(--success);
}

/* Cards */
.card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 20px;
}

/* Service Selection - Step 1 */
.service-grid {
    display: grid;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--text-secondary);
}

.service-item.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.5rem;
}

.service-info {
    flex: 1;
}

.service-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.service-meta {
    font-size: 0.85rem;
    color: var(--accent);
}

.service-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-item.selected .service-check {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Selected Services - Step 2 */
.date-selector {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.date-selector label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.date-display:hover {
    border-color: var(--accent);
}

.date-display svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    color: var(--text-secondary);
}

/* Calendar Popup */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.calendar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.calendar-popup {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 320px;
    max-width: 95vw;
    transform: scale(0.9);
    transition: var(--transition);
}

.calendar-overlay.show .calendar-popup {
    transform: scale(1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.calendar-header button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.calendar-header button:hover {
    background: var(--bg-tertiary);
}

.calendar-header button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-title {
    font-weight: 600;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.calendar-day:hover:not(:disabled) {
    background: var(--bg-secondary);
}

.calendar-day.today {
    font-weight: 700;
    color: var(--accent);
}

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

.calendar-day:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--success);
    position: absolute;
    bottom: 4px;
}

.calendar-day.selected .dot {
    background: white;
}

/* Selected Service Card */
.selected-service-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.selected-service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.selected-service-info h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.selected-service-info span {
    font-size: 0.85rem;
    color: var(--accent);
}

.remove-service {
    color: var(--danger);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.remove-service:hover {
    text-decoration: underline;
}

.selected-service-body {
    padding: 16px;
}

.staff-select-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.staff-dropdown {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.staff-dropdown:focus {
    outline: none;
    border-color: var(--accent);
}

/* Time Selection */
.time-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.time-section-header {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 12px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg);
}

.time-slot:hover:not(.unavailable) {
    border-color: var(--accent);
    background: var(--accent-light);
}

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

.time-slot.unavailable {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: line-through;
}

.no-slots-message {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.no-slots-message svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

/* Total Section */
.total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.total-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

/* Add More Button */
.add-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--accent);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
}

.add-more-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* Confirmation Step */
.confirmation-card {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.confirmation-icon svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.confirmation-card h2 {
    margin-bottom: 8px;
}

.confirmation-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.booking-details {
    text-align: left;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.booking-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.booking-detail-row span:first-child {
    color: var(--text-secondary);
}

.booking-detail-row span:last-child {
    font-weight: 600;
}

/* Auth Section */
.auth-prompt {
    background: linear-gradient(135deg, var(--accent-light), #fff);
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 20px;
}

.auth-prompt h3 {
    margin-bottom: 8px;
}

.auth-prompt p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.logged-in-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
}

.user-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

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

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

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

.btn-accent:hover {
    opacity: 0.9;
}

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

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

.btn-block {
    width: 100%;
}

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

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.nav-buttons .btn {
    flex: 1;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
    .appointment-container {
        padding: 12px;
    }
    
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .auth-buttons {
        flex-direction: column;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
}
