/* Festival Site Styles */

/* Fix for Bootstrap modal backdrop issues */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;
}

/* Ensure proper modal cleanup */
body.modal-open {
    overflow: hidden;
}

/* Fix for passive event listener warnings */
* {
    touch-action: manipulation;
}

/* Icon centering utility - reusable for any button with centered icon */
.icon-centered {
    padding: 0;
    position: relative;
}

.icon-centered i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Specific button sizes */
.basket-button {
    width: 3rem;
    height: 3rem;
    border: none;
}

.basket-button i {
    font-size: 1.25rem;
}

/* Basket count badge styling */
.basket-count-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
    padding: 0.1rem 0.3rem;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Festival documents: subtle click affordance */
.festival-doc-card .card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.festival-doc-card:hover .card {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
}

.festival-doc-card:hover .festival-doc-card__cta {
    text-decoration: underline;
}

/* Card and Button Transitions - exclude card headers to prevent layout interference */
.card:not(.card-header), .btn {
    transition: all 0.2s ease-in-out;
}

.rounded-circle {
    flex-shrink: 0;
}

/* Card Icon Styles */
.card-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

/* Background Gradients */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-bs-theme="dark"] .bg-gradient-light {
    background: linear-gradient(135deg, var(--bs-secondary-bg) 0%, var(--bs-body-bg) 100%);
}

/* Text Effects */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Hero Icon Animation - Note: .hero-icon class is unused and removed */

/* Search and CTA Styles */
.search-hero {
    max-width: 100%;
}

@media (min-width: 768px) {
    .search-hero {
        max-width: 500px;
    }
}

@media (min-width: 1200px) {
    .search-hero {
        max-width: 600px;
    }
}

/* Mobile search layout - stack input and button vertically for better mobile UX */
@media (max-width: 767.98px) {
    .input-group.search-hero {
        flex-direction: column;
        width: 100%;
    }

    .input-group.search-hero .form-control {
        border-radius: 0.375rem 0.375rem 0 0;
        margin-bottom: 0.5rem;
        border-bottom: 0;
        width: 100%;
    }

    .input-group.search-hero .btn {
        border-radius: 0 0 0.375rem 0.375rem;
        width: 100%;
        border-top: 0;
    }
}

.search-hero .form-control {
    font-size: 1.1rem;
}

.cta-primary {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Form field focus improvements */
.entry-form .form-check-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Decorative Elements - Note: Specific numbered classes (decorative-note-1 through 4) are unused and removed */

/* Festival Logo Styles */
.festival-logo {
    transition: transform 0.3s ease-in-out;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: contain;
}

.festival-logo:hover {
    transform: scale(1.05);
}

.festival-logo-container {
    position: relative;
    display: inline-block;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .festival-logo {
        max-width: 150px !important;
        max-height: 150px !important;
    }
}

@media (max-width: 576px) {
    .festival-logo {
        max-width: 120px !important;
        max-height: 120px !important;
    }
}

/* Quick Contact Section */
.btn-outline-primary, .btn-outline-success {
    transition: all 0.3s ease-in-out;
    border-width: 2px;
}

.btn-outline-primary:hover, .btn-outline-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
    color: white;
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border-color: #198754;
    color: white;
}

/* Programme (online)
   Styles are scoped to avoid affecting PDF templates. */

.programme-online .festival-adjudicators-section {
    margin-top: 2rem;
}

.programme-online .festival-adjudicators-section .adjudicator-card {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.programme-online .festival-adjudicators-section .adjudicator-card:first-of-type {
    padding-top: 0;
}

.programme-online .festival-adjudicators-section .adjudicator-card:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.programme-online .festival-adjudicators-section .adjudicator-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.programme-online .festival-adjudicators-section .adjudicator-photo {
    width: 5.5rem;
    height: 5.5rem;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid var(--bs-border-color-translucent);
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .programme-online .festival-adjudicators-section .adjudicator-photo {
        width: 4.5rem;
        height: 4.5rem;
    }
}

.programme-online .festival-adjudicators-section .adjudicator-name {
    margin-bottom: 0.25rem;
}

.programme-online .festival-adjudicators-section .adjudicator-sections {
    margin-bottom: 0;
    color: var(--bs-secondary-color);
}

.programme-online .festival-adjudicators-section .adjudicator-bio {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Add to Cart UX Improvements */


/* Toast notifications */
.toast-container {
    z-index: 1060;
    top: 20px !important;
    right: 80px !important;
}

.toast {
    min-width: 320px;
    max-width: 360px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: slideInRight 0.4s ease-out;
}


@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-header {
    border-bottom: none;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
}

.toast-body {
    padding: 0.75rem 1rem;
    background: var(--bs-body-bg);
}

.toast .bg-success {
    background-color: #198754 !important;
}

.toast .text-success {
    color: #198754 !important;
}

.toast .bg-success.bg-opacity-10 {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.toast .bg-white.bg-opacity-20 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.toast .bi-basket-fill {
    transition: transform 0.2s ease;
}

.toast .bi-basket-fill:hover {
    transform: scale(1.1);
}

.toast-body {
    transition: background-color 0.2s ease;
}

.toast-body:hover {
    background-color: var(--bs-secondary-bg) !important;
}

/* Basket count animation */
.basket-count-badge {
    transition: all 0.3s ease-in-out;
}

/* Enhanced alert styling */
.alert {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert .alert-heading {
    font-weight: 600;
}

/* Form submission states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Class description in modal */
.class-description {
    background-color: var(--bs-secondary-bg);
    border-radius: 0.375rem;
    padding: 0.75rem;
    border-left: 3px solid #0d6efd;
}

.class-description h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.5rem;
}

.class-description p {
    line-height: 1.5;
    color: var(--bs-secondary-color);
}

/* Enhanced modal styling */
.modal-lg {
    max-width: 800px;
}

.modal-header.bg-primary {
    border-bottom: none;
}

.modal-footer.bg-light {
    border-top: 1px solid #dee2e6;
}

/* Form field improvements - consolidated with entry-form styles */
.form-text {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}

.form-label i {
    color: var(--bs-secondary-color);
}

/* Enhanced button styling - consolidated with other button styles */
.btn-lg {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Consolidated button hover effects */

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Class info enhancements */
.text-primary {
    color: #0d6efd !important;
}

.h4 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Enhanced form styling for entry forms */
.entry-form .form-label {
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.entry-form .form-label i {
    color: var(--bs-secondary-color);
    margin-right: 0.5rem;
    font-size: 1rem;
}

.entry-form .form-control {
    border: 2px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
}

.entry-form .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.entry-form .form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.88 1.88 3.77-3.77.94.94L4.12 9.55z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.entry-form .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.entry-form .form-text {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.entry-form .vocal-fields {
    background-color: var(--bs-secondary-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 1.5rem;
    border-left: 4px solid #0d6efd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.entry-form .vocal-fields h6 {
    color: #0d6efd;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.entry-form .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

.entry-form .form-check-label {
    font-weight: 500;
    color: var(--bs-body-color);
    margin-left: 0.5rem;
}

/* Enhanced submit button with hover/active feedback */
.entry-form .btn-primary {
    font-weight: 600;
}

.entry-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.entry-form .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* HTMX Indicator rules moved to global theme.scss */

/* Disabled button styling - scoped to modals only */
#modals-here .save-button:disabled,
#modals-here .cancel-button:disabled,
#modals-here .btn-close:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}


/* Form validation improvements */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Theme toggle container positioning */
.theme-toggle-container {
    z-index: 1050;
}

/* Basket indicator positioning */
.basket-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
}

/* Toast notifications - min-width already defined above */

/* Modal form improvements */
.modal-body .card {
    margin-bottom: 0;
}

/* Success icon utility classes */
.success-icon-container {
    width: 60px;
    height: 60px;
}

/* Simple, clean header styling - no complex flexbox */
.card-header.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

[data-bs-theme="dark"] .card-header.bg-gradient-light {
    background: linear-gradient(135deg, var(--bs-secondary-bg) 0%, var(--bs-body-bg) 100%);
}

/* Donation quick buttons accessibility */
.donation-quick-btn {
    transition: all 0.2s ease-in-out;
    outline: none;
}

.donation-quick-btn:focus {
    outline: 2px solid #198754;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.donation-quick-btn:focus-visible {
    outline: 2px solid #198754;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.donation-quick-btn.active {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.donation-quick-btn.active:focus {
    outline-color: #157347;
}

/* Modal scrollable body with visual scroll indicators */
.modal-body-scrollable {
    max-height: 75vh;
    overflow-y: auto;
    scrollbar-gutter: stable;
    position: relative;
    z-index: 1;
}

/* Larger modal for entry forms on desktop - only apply above md breakpoint */
@media (min-width: 768px) {
    #quickEntryModal .modal-dialog {
        max-width: 90%;
    }
}

@media (min-width: 1200px) {
    #quickEntryModal .modal-dialog {
        max-width: 1140px;
    }
}

/* Visual fade indicators - cross-browser compatible */
.scroll-fade-indicator {
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.scroll-fade-top {
    height: 40px;
    background: linear-gradient(to bottom, var(--bs-body-bg), transparent);
}

.scroll-fade-bottom {
    height: 50px;
    background: linear-gradient(
        to top,
        var(--bs-body-bg),
        color-mix(in srgb, var(--bs-body-bg) 70%, transparent) 60%,
        transparent
    );
    display: flex;
    align-items: flex-end;
}

.scroll-fade-bottom * {
    pointer-events: none;
}

@media (max-width: 576px) {
    .scroll-fade-bottom {
        height: 30px;
    }
}

/* Enhanced scrollbar visibility for webkit browsers */
.modal-body-scrollable::-webkit-scrollbar {
    width: 12px;
}

.modal-body-scrollable::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

.modal-body-scrollable::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 6px;
    border: 2px solid var(--bs-secondary-bg);
}

.modal-body-scrollable::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--bs-primary) 85%, black);
}

/* Override breadcrumb margin when wrapped in page header */
.breadcrumb-wrapper nav[aria-label="breadcrumb"] {
    margin-bottom: 0;
}
