/* ==========================================================================
   Features CSS - Wedding Platform
   Consolidated styles for Quiz, Guestbook, Song Requests, Dress Code,
   Map Section, and Language Switcher components
   ========================================================================== */

/* ==========================================================================
   Dress Code Section
   ========================================================================== */
.dresscode-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.color-palette {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.avoid {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch.avoid i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dresscode-examples {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dresscode-example {
    text-align: center;
    max-width: 200px;
}

.dresscode-example-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dresscode-example-img:hover {
    transform: translateY(-5px);
}

.dresscode-example-caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--bs-dark);
}

/* ==========================================================================
   Map Section
   ========================================================================== */
.map-container {
    border-radius: 15px;
}

.map-container iframe {
    display: block;
}

.map-interactive {
    width: 100%;
    min-height: 300px;
}

.mapboxgl-popup-content {
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.mapboxgl-popup-content .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.mapbox-popup,
.leaflet-popup-content {
    font-size: 0.95rem;
    line-height: 1.4;
}

.leaflet-popup-content .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.location-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.location-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */
.language-switcher {
    margin-left: 1rem;
}

.lang-toggle {
    color: inherit;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.lang-toggle:hover {
    color: var(--color-primary);
}

/* Language Switcher in main header - match nav-link styles */
.header .lang-toggle {
    color: #ffffff;
}

.header .lang-toggle:hover {
    color: rgba(255, 255, 255, 0.7);
}

.header.switched-header .lang-toggle {
    color: #7c7e7f;
}

.header.switched-header .lang-toggle:hover {
    color: var(--color-primary);
}

.flag-icon {
    display: inline-block;
    width: 1.33em;
    height: 1em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Flag icons using inline SVG */
.flag-icon-it { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect fill='%23009246' width='1' height='2'/%3E%3Crect fill='%23fff' x='1' width='1' height='2'/%3E%3Crect fill='%23ce2b37' x='2' width='1' height='2'/%3E%3C/svg%3E"); }
.flag-icon-gb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cpath fill='%23012169' d='M0 0h60v30H0z'/%3E%3Cpath fill='%23fff' d='M0 0l60 30M60 0L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath fill='%23c8102e' d='M0 0l60 30M60 0L0 30' stroke='%23c8102e' stroke-width='4'/%3E%3Cpath fill='%23fff' d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath fill='%23c8102e' d='M30 0v30M0 15h60' stroke='%23c8102e' stroke-width='6'/%3E%3C/svg%3E"); }
.flag-icon-es { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect fill='%23c60b1e' width='3' height='2'/%3E%3Crect fill='%23ffc400' y='.5' width='3' height='1'/%3E%3C/svg%3E"); }
.flag-icon-fr { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect fill='%23002395' width='1' height='2'/%3E%3Crect fill='%23fff' x='1' width='1' height='2'/%3E%3Crect fill='%23ed2939' x='2' width='1' height='2'/%3E%3C/svg%3E"); }
.flag-icon-de { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Crect fill='%23000' width='5' height='3'/%3E%3Crect fill='%23d00' y='1' width='5' height='2'/%3E%3Crect fill='%23ffce00' y='2' width='5' height='1'/%3E%3C/svg%3E"); }
.flag-icon-pt { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect fill='%23006600' width='1.2' height='2'/%3E%3Crect fill='%23ff0000' x='1.2' width='1.8' height='2'/%3E%3C/svg%3E"); }
.flag-icon-us { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7410 3900'%3E%3Cpath fill='%23b22234' d='M0 0h7410v3900H0z'/%3E%3Cpath stroke='%23fff' stroke-width='300' d='M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0'/%3E%3Cpath fill='%233c3b6e' d='M0 0h2964v2100H0z'/%3E%3C/svg%3E"); }

.language-switcher .dropdown-item.active {
    background-color: var(--primary, var(--color-primary, #6366f1));
    color: white;
}

/* Language Switcher Mobile */
@media (max-width: 991px) {
    .navbar-collapse .language-switcher {
        margin: 0.5rem 1rem;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        width: calc(100% - 2rem);
    }

    .navbar-collapse .language-switcher .lang-toggle {
        padding: 0.5rem 0;
        color: #333;
    }

    /* Force dropdown to open left on mobile */
    .navbar-collapse .language-switcher .dropdown-menu {
        right: auto !important;
        left: 0 !important;
    }
}

/* ==========================================================================
   Internal Pages - Section spacing
   ========================================================================== */
.quiz-section,
.internal-section {
    padding-top: 120px !important;
}

.quiz-screen {
    animation: quizFadeIn 0.3s ease;
}

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

.quiz-option {
    text-align: left;
    padding: 1rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 5%, transparent);
}

.quiz-option.selected {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.quiz-option.correct {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.1);
}

.quiz-option.incorrect {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.quiz-option.disabled {
    pointer-events: none;
}

.quiz-option .option-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.8rem;
    background: #e9ecef;
}

.quiz-option.correct .option-icon {
    background: #198754;
    color: white;
}

.quiz-option.incorrect .option-icon {
    background: #dc3545;
    color: white;
}

/* ==========================================================================
   Guestbook Page
   ========================================================================== */
.guestbook-card {
    transition: transform 0.2s ease;
}

.guestbook-card:hover {
    transform: translateY(-2px);
}

.guestbook-messages {
    max-height: 600px;
    overflow-y: auto;
}

/* ==========================================================================
   Activities Section
   ========================================================================== */
.activity-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.activity-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* ==========================================================================
   Internal Pages - Navbar with contrast
   ========================================================================== */
.internal-page .header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.internal-page .header .nav-link {
    color: #333 !important;
}

.internal-page .header .nav-link:hover {
    color: var(--color-primary) !important;
}

.internal-page .header .btn-navbar-toggler {
    color: #333;
}

.internal-page .header .lang-toggle {
    color: #333;
}

.internal-page .header .lang-toggle:hover {
    color: var(--color-primary);
}

/* Back to site link in minimal header */
.back-to-site-link {
    color: #333 !important;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.back-to-site-link:hover {
    color: var(--color-primary) !important;
}

/* ==========================================================================
   Form Controls - Better visibility and custom focus
   ========================================================================== */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(226, 93, 93, 0.15);
    outline: none;
}

.bg-white .form-control,
.bg-white .form-control:focus {
    background-color: #f8f8f8;
    border-color: #ccc;
}

.bg-white .form-control:focus {
    background-color: #fff;
    border-color: var(--color-primary);
}
