/* ============================================
   BOOKING MODAL STYLES
   --------------------------------------------
   Used by both /services (listing) and /services/<slug> (detail).
   Extracted from the inline <style> block previously in services.php.
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

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

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 520px;
    width: 100%;
    padding: 40px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-service {
    font-size: 1rem;
    color: var(--accent-cyan);
}

.modal-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 4px;
}

/* Step indicator */
.booking-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.booking-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.booking-step.active {
    color: var(--accent-cyan);
}

.booking-step.completed {
    color: #22c55e;
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.booking-step.active .step-dot {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    color: var(--accent-cyan);
}

.booking-step.completed .step-dot {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.step-divider {
    width: 24px;
    height: 2px;
    background: var(--border-color);
    border-radius: 1px;
}

/* Booking panels */
.booking-panel {
    display: none;
}

.booking-panel.active {
    display: block;
    animation: fadeInPanel 0.3s ease;
}

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

/* Discord login panel */
.discord-login-panel {
    text-align: center;
    padding: 20px 0;
}

.discord-login-panel p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-discord-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: #5865F2;
    color: white;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-discord-login:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.user-badge img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.user-badge span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Date/Time picker */
.scheduler-panel {
    padding: 4px 0;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.calendar-nav h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.cal-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cal-btn:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

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

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

.cal-day-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 0;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

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

.cal-day.unavailable {
    color: var(--text-muted);
    opacity: 0.3;
    cursor: not-allowed;
}

.cal-day.available:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

.cal-day.selected {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
}

.cal-day.today {
    border-color: var(--accent-cyan);
}

/* Time slots */
.time-slots-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.time-slot {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.time-slot:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.05);
}

.time-slot.selected {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
    font-weight: 700;
}

.no-slots-msg {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-continue {
    width: 100%;
    padding: 14px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

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

/* PayPal panel */
.payment-panel {
    padding: 4px 0;
}

.payment-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.payment-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.payment-summary .summary-label {
    color: var(--text-secondary);
}

.payment-summary .summary-value {
    font-weight: 600;
}

.payment-summary .summary-total {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 1rem;
}

.payment-summary .summary-total .summary-value {
    color: var(--accent-cyan);
    font-family: var(--font-display);
    font-weight: 800;
}

#paypal-button-container {
    min-height: 45px;
    margin-bottom: 16px;
}

.paypal-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.payment-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.payment-note svg {
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* TOS Section */
.tos-section {
    margin: 16px 0;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.tos-policy {
    margin-bottom: 14px;
}

.tos-policy h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.tos-policy p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tos-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.tos-checkbox input {
    display: none;
}

.tos-checkmark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin-top: 1px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tos-checkbox input:checked ~ .tos-checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.tos-checkbox input:checked ~ .tos-checkmark::after {
    content: '\2713'; /* ✓ */
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.tos-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tos-link {
    color: var(--accent-glow);
    text-decoration: underline;
}

.paypal-blocked {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--text-primary);
}

/* Error/status messages */
.booking-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
    display: none;
}

.booking-error.visible {
    display: block;
}

/* Modal note */
.modal-note {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 10px;
    font-size: 0.8rem;
    color: #fbbf24;
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .modal {
        padding: 28px 20px;
        max-height: 95vh;
    }
    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
