/* ==================== */
/* FIELDBOOKING BRAND THEME (same colours as the home page) */
/* ==================== */
:root {
    --fb-blue: #4285F4; --fb-blue-dark: #2A62C9; --fb-blue-soft: #EAF1FE;
    --fb-green: #20A619; --fb-green-dark: #177A12; --fb-green-soft: #EAF7E9;
    --fb-ink: #1F2937; --fb-muted: #6B7280; --fb-line: #E5E7EB; --fb-bg: #F6F8FB;
}
body { background: var(--fb-bg); color: var(--fb-ink); }
a { color: var(--fb-blue); }
a:hover { color: var(--fb-blue-dark); }

/* Green = actions (book, pay, save) */
.btn-success, .btn-fb { background-color: var(--fb-green); border-color: var(--fb-green); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active,
.btn-fb:hover, .btn-fb:focus { background-color: var(--fb-green-dark) !important; border-color: var(--fb-green-dark) !important; color: #fff; }
.btn-success:disabled, .btn-success.disabled { background-color: var(--fb-green); border-color: var(--fb-green); }
.btn-outline-success { color: var(--fb-green); border-color: var(--fb-green); }
.btn-outline-success:hover, .btn-outline-success:active, .btn-check:checked + .btn-outline-success { background-color: var(--fb-green); border-color: var(--fb-green); color: #fff; }
.text-success { color: var(--fb-green) !important; }
.bg-success { background-color: var(--fb-green) !important; }
.border-success { border-color: var(--fb-green) !important; }
.alert-success { background-color: var(--fb-green-soft); border-color: #c6e9c3; color: var(--fb-green-dark); }
.spinner-border.text-success { color: var(--fb-green) !important; }

/* Blue = brand, navigation, information */
.btn-primary { background-color: var(--fb-blue); border-color: var(--fb-blue); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active { background-color: var(--fb-blue-dark) !important; border-color: var(--fb-blue-dark) !important; color: #fff; }
.btn-primary:disabled, .btn-primary.disabled { background-color: var(--fb-blue); border-color: var(--fb-blue); }
.btn-outline-primary { color: var(--fb-blue); border-color: var(--fb-blue); }
.btn-outline-primary:hover, .btn-outline-primary:active, .btn-check:checked + .btn-outline-primary { background-color: var(--fb-blue); border-color: var(--fb-blue); color: #fff; }
.btn-info { background-color: var(--fb-blue); border-color: var(--fb-blue); color: #fff; }
.btn-info:hover, .btn-info:focus { background-color: var(--fb-blue-dark); border-color: var(--fb-blue-dark); color: #fff; }
.btn-outline-info { color: var(--fb-blue); border-color: var(--fb-blue); }
.btn-outline-info:hover { background-color: var(--fb-blue); border-color: var(--fb-blue); color: #fff; }
.text-primary, .text-info { color: var(--fb-blue) !important; }
.bg-primary, .bg-info { background-color: var(--fb-blue) !important; color: #fff; }
.border-primary, .border-info { border-color: var(--fb-blue) !important; }
.alert-info, .alert-primary { background-color: var(--fb-blue-soft); border-color: #cfdffc; color: var(--fb-blue-dark); }
.badge.bg-primary, .badge.bg-info { color: #fff; }
.progress-bar { background-color: var(--fb-blue); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: var(--fb-blue); }
.nav-tabs .nav-link.active { color: var(--fb-blue); border-bottom-color: transparent; }
.page-link { color: var(--fb-blue); }
.page-item.active .page-link { background-color: var(--fb-blue); border-color: var(--fb-blue); }
.form-check-input:checked { background-color: var(--fb-green); border-color: var(--fb-green); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: #9dbefa; box-shadow: 0 0 0 .2rem rgba(66, 133, 244, .2);
}
.dropdown-item.active, .dropdown-item:active { background-color: var(--fb-blue); }
.card { border-radius: 14px; }
.card-header.bg-primary, .card-header.bg-success, .card-header.bg-info { border-top-left-radius: 14px; border-top-right-radius: 14px; }

/* Page header used on inner pages */
.fb-page-header {
    background: linear-gradient(135deg, var(--fb-blue-dark) 0%, var(--fb-blue) 60%, #5b97f7 100%);
    color: #fff; border-radius: 0 0 22px 22px; padding: 1.75rem 1.5rem; margin: 0 -12px 1.5rem;
}
.fb-page-header .fb-pitch-band { height: 5px; width: 56px; border-radius: 3px; background: var(--fb-green); margin-bottom: .75rem; }

/* Buttons that are working after a click */
.fb-busy { pointer-events: none; opacity: .75; cursor: progress; }
.fb-busy .fb-busy-spinner { width: 1rem; height: 1rem; border-width: .15em; vertical-align: -.15em; margin-right: .4rem; }

/* Field photo placeholder when a picture cannot load */
img.fb-img-fallback { object-fit: cover; background: var(--fb-blue-soft); }

/* ==================== */
/* GENERAL STYLES */
/* ==================== */

#footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px; /* Altura do footer */
    background-color: #f5f5f5;
    text-align: center;
    line-height: 60px;
    border-top: 1px solid #e7e7e7;
}

/* ==================== */
/* BOOKING CONFIRMATION STYLES */
/* ==================== */

/* Confirmation Card Styles */
.confirmation-card {
    border-left: 5px solid #28a745;
}

/* Payment Card Styles */
.payment-card {
    border-left: 5px solid #007bff;
}

/* QR Code Styles */
.qr-code {
    width: 200px;
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px dashed #dee2e6;
}

.qr-icon {
    font-size: 3rem;
}

/* Confirmation Icon */
.confirmation-icon {
    font-size: 5rem;
}

/* Payment Steps */
.payment-steps {
    text-align: left;
    padding-left: 1.5rem;
}

.payment-steps li {
    margin-bottom: 0.5rem;
}

/* Bank Details */
.bank-details {
    text-align: center;
}

.bank-note {
    margin-top: 1rem;
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
}

.view-details-btn,
.book-again-btn {
    min-width: 200px;
    justify-content: center;
}

/* Important Notes */
.important-notes {
    margin-top: 2rem;
}

.notes-list {
    padding-left: 1.5rem;
}

.notes-list li {
    margin-bottom: 0.5rem;
}

/* Booking Status Badge Styles */
.booking-status-badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PENDING Status */
.booking-status-badge[data-status="PENDING"] {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* CONFIRMED Status */
.booking-status-badge[data-status="CONFIRMED"] {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* CANCELLED Status */
.booking-status-badge[data-status="CANCELLED"] {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* COMPLETED Status */
.booking-status-badge[data-status="COMPLETED"] {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Hover effects */
.booking-status-badge[data-status="PENDING"]:hover {
    background-color: #ffeaa7;
    color: #856404;
}

.booking-status-badge[data-status="CONFIRMED"]:hover {
    background-color: #bee5eb;
    color: #0c5460;
}

.booking-status-badge[data-status="CANCELLED"]:hover {
    background-color: #f5c6cb;
    color: #721c24;
}

.booking-status-badge[data-status="COMPLETED"]:hover {
    background-color: #c3e6cb;
    color: #155724;
}

/* Custom styles for confirmation page */
.confirmation-card, .payment-card, .qr-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.confirmation-card:hover, .payment-card:hover, .qr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.qr-code-img {
    transition: transform 0.3s ease;
}

.qr-code-img:hover {
    transform: scale(1.05);
}

.action-buttons .btn {
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.important-notes {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107 !important;
}

.notes-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ==================== */
/* RESPONSIVE ADJUSTMENTS */
/* ==================== */

@media (max-width: 768px) {
    .qr-code {
        width: 150px;
        height: 150px;
    }

    .confirmation-icon {
        font-size: 4rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .view-details-btn,
    .book-again-btn {
        width: 100%;
    }

    /* Footer adjustments for mobile */
    #footer {
        height: auto;
        padding: 15px 0;
        line-height: 1.5;
    }
    /* Ensure proper sticky behavior */
    .wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100vh; /* Full viewport height */
    }

    /* Navbar styling */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1020; /* Above other content */
        width: 100%;
    }

    /* Prevent content from hiding behind navbar */
    body {
        padding-top: 56px; /* Height of your navbar */
    }

    /* Adjust for mobile */
    @media (max-width: 991.98px) {
        body {
            padding-top: 72px; /* Taller navbar on mobile */
        }
    }
}

/* ===== CALENDAR STYLES ===== */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-header {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.calendar-day {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.calendar-day.empty {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
}

.calendar-day.available {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.calendar-day.booked {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
    text-decoration: line-through;
}

.calendar-day.future {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.calendar-day.today {
    border: 2px solid #007bff;
    font-weight: bold;
    background-color: #e3f2fd;
}

.calendar-day.past {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

.calendar-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-day small {
    font-size: 0.7rem;
    margin-top: 5px;
    display: block;
    line-height: 1.2;
}

/* ===== PAYMENT OPTION STYLES ===== */
.payment-option {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.payment-option:hover {
    border-color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.payment-option.selected {
    border-color: #28a745;
    background-color: #f8fff9;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.payment-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

.payment-option .form-check-input {
    margin-top: 0.2rem;
}

.payment-option .form-check-label {
    font-weight: bold;
    margin-left: 0.5rem;
}

.payment-option .text-muted {
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.4;
}

/* ===== BADGE STYLES ===== */
.savings-badge {
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    background-color: #28a745;
    border-radius: 6px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .calendar {
        gap: 3px;
    }

    .calendar-day {
        padding: 8px 5px;
        min-height: 50px;
        font-size: 0.9rem;
    }

    .calendar-day small {
        font-size: 0.6rem;
    }

    .calendar-day-header {
        padding: 8px 5px;
        font-size: 0.7rem;
    }

    .payment-option {
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .calendar-day {
        padding: 6px 3px;
        min-height: 45px;
        font-size: 0.8rem;
    }

    .calendar-day small {
        font-size: 0.55rem;
    }

    .calendar-day-header {
        padding: 6px 3px;
        font-size: 0.65rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calendar-day {
    animation: fadeIn 0.3s ease-out;
}

.calendar-day:nth-child(odd) {
    animation-delay: 0.05s;
}

.calendar-day:nth-child(even) {
    animation-delay: 0.1s;
}

/* ===== ACCESSIBILITY ===== */
.payment-option:focus-within {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

.calendar-day:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .calendar {
        break-inside: avoid;
    }

    .calendar-day {
        border: 1px solid #000;
        min-height: 50px;
    }

    .payment-option {
        border: 1px solid #000;
        break-inside: avoid;
    }

    .btn {
        display: none;
    }
}

/* ===== SUBSCRIPTION SPECIFIC STYLES ===== */
.subscription-benefit-icon {
    width: 60px;
    height: 60px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.time-slot {
    display: inline-block;
    margin: 5px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.time-slot:hover {
    border-color: #28a745;
    transform: translateY(-2px);
}

.time-slot.selected {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.duration-option {
    display: inline-block;
    margin: 5px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.duration-option:hover {
    border-color: #007bff;
    transform: translateY(-2px);
}

.duration-option.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.section-hidden {
    display: none;
}