/* ==========================================================================
   DANCE 14s Joomla Template Custom Overrides (Webflow Aligned)
   Seamless integration of Joomla components into Webflow Subpages
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Joomla Subpage Component Container
   -------------------------------------------------------------------------- */
.d14s-component-wrapper {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px 30px;
    margin-top: 15px;
    color: #091d3a;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .d14s-component-wrapper {
        padding: 20px 15px;
        border-radius: 8px;
    }
}

/* --------------------------------------------------------------------------
   2. Typography & Base Inside Joomla Components
   -------------------------------------------------------------------------- */
.d14s-component-wrapper h1,
.d14s-component-wrapper h2,
.d14s-component-wrapper h3,
.d14s-component-wrapper h4,
.d14s-component-wrapper h5,
.d14s-component-wrapper h6,
.d14s-component-wrapper legend {
    font-family: 'Figtree', 'Montserrat', Arial, sans-serif;
    color: #091d3a;
    font-weight: 700;
    margin-top: 0;
}

.d14s-component-wrapper p,
.d14s-component-wrapper label,
.d14s-component-wrapper span:not(.badge):not(.btn) {
    color: #475569;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   3. Buttons & Form Controls (Webflow Blue & Square Style)
   -------------------------------------------------------------------------- */
.d14s-component-wrapper .btn-primary,
.d14s-component-wrapper .portal-card-action,
.d14s-component-wrapper .btn-save-vote,
.d14s-component-wrapper .btn-play-row,
.d14s-component-wrapper button[type="submit"] {
    background-color: #236ddc !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    font-family: 'Figtree', 'Montserrat', Arial, sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(35, 109, 220, 0.2) !important;
}

.d14s-component-wrapper .btn-primary:hover,
.d14s-component-wrapper .portal-card-action:hover,
.d14s-component-wrapper .btn-save-vote:hover,
.d14s-component-wrapper .btn-play-row:hover,
.d14s-component-wrapper button[type="submit"]:hover {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.3) !important;
}

.d14s-component-wrapper .form-control,
.d14s-component-wrapper input[type="text"],
.d14s-component-wrapper input[type="password"],
.d14s-component-wrapper input[type="email"],
.d14s-component-wrapper select,
.d14s-component-wrapper textarea {
    background-color: #ffffff !important;
    border: 1px solid #d9dce2 !important;
    border-radius: 4px !important;
    color: #091d3a !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    font-family: 'Open Sans', Arial, sans-serif !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.d14s-component-wrapper .form-control:focus,
.d14s-component-wrapper input:focus,
.d14s-component-wrapper select:focus,
.d14s-component-wrapper textarea:focus {
    border-color: #236ddc !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(35, 109, 220, 0.25) !important;
}

/* --------------------------------------------------------------------------
   4. Component Interior Overrides (Portal Cards & Videos)
   -------------------------------------------------------------------------- */
.com-choreos-container {
    background-color: #ffffff !important;
    color: #091d3a !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.choreos-title {
    color: #091d3a !important;
    background: none !important;
    -webkit-text-fill-color: #091d3a !important;
    font-family: 'Figtree', 'Montserrat', Arial, sans-serif !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
}

.choreos-subtitle {
    color: #64748b !important;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.portal-card,
.choreo-card,
.choreos-sidebar,
.choreos-panel {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    color: #091d3a !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.portal-card:hover,
.choreo-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(35, 109, 220, 0.1) !important;
    border-color: #bfdbfe !important;
}

.portal-card-title,
.choreo-card .choreo-title,
.sidebar-heading {
    color: #091d3a !important;
    font-weight: 700 !important;
}

.portal-card-body,
.choreo-description,
.choreo-date,
.nav-tree-link {
    color: #475569 !important;
}

/* --------------------------------------------------------------------------
   5. Modals (Elterninfo, Polls, Lightbox)
   -------------------------------------------------------------------------- */
.choreo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.choreo-lightbox.d-none {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.choreo-lightbox.show {
    display: flex !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 29, 58, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto !important;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    color: #091d3a;
    z-index: 100000;
    overflow: hidden;
    pointer-events: auto !important;
}

.lightbox-content h3,
.lightbox-content h4,
.lightbox-video-title {
    color: #091d3a !important;
    font-weight: 700 !important;
}

.lightbox-close {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    padding: 0.25rem 0.5rem !important;
    line-height: 1 !important;
    pointer-events: auto !important;
}

.lightbox-close:hover {
    color: #091d3a !important;
}

.poll-item-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.poll-note-input {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #091d3a !important;
    border-radius: 4px !important;
}

/* --------------------------------------------------------------------------
   6. PWA Component-Mode Styling (Clean Light Mode Container)
   -------------------------------------------------------------------------- */
body.component-mode {
    background-color: #f1f5f9 !important;
    background-image: none !important;
    color: #091d3a !important;
    margin: 0 !important;
    padding: 1.25rem !important;
    min-height: 100vh !important;
}

body.component-mode .d14s-component-container {
    max-width: 1200px;
    margin: 0 auto;
}
