/*
 Theme Name:   Astra Child
 Description:  Custom child theme for managing parish bulletin templates and inline view overrides.
 Template:     astra
 Version:      1.0.0
*/

/* Hide specific block structures on mobile devices */
@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* ==========================================================================
   AcyMailing Form - Pixel-Perfect Baseline Alignment Fix
   ========================================================================== */

/* Main Section Wrapper */
.acym_module_form {
    max-width: 650px !important;
    margin: 0 auto !important;
    padding: 10px 20px !important;
}

.acym_introtext {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    font-size: 16px !important;
}

/* Force-flatten native wrapper margins causing the vertical offset */
.acym_form,
.fieldacy2,
.acysubbuttons {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 1. Base Mobile Settings (Stacked Framework) */
.acym_form {
    width: 100% !important;
    display: block !important;
}

.acym_module_form .acym_form input.acym__user__edit__email[type="email"] {
    width: 100% !important;
    height: 48px !important; /* Explicitly locked height */
    padding: 0 15px !important;
    border: 1px solid #ccd0d4 !important;
    border-radius: 4px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    background-color: #ffffff !important;
    color: var(--ast-global-color-3) !important;
    box-sizing: border-box !important;
    margin: 0 0 15px 0 !important;
}

/* Terms & Conditions Checkbox Row */
.fieldacyterms {
    width: 100% !important;
    text-align: center !important;
    font-size: 14px !important;
    margin: 0 0 20px 0 !important;
    color: var(--ast-global-color-3) !important;
}

.fieldacyterms label {
    display: inline-block !important;
}

.fieldacyterms input.checkbox {
    margin-right: 8px !important;
    vertical-align: middle !important;
    position: relative;
    top: -1px; /* Micro-alignment adjustment for checkbox */
}

/* Button Container Block */
.acysubbuttons {
    width: 100% !important;
    text-align: center !important;
}

/* Button Element Customization */
.acym_module_form .acysubbuttons button.subbutton {
    background-color: var(--ast-global-color-1) !important;
    color: #ffffff !important;
    height: 48px !important; /* Matches the input box height precisely */
    padding: 0 35px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    /* Forces the button text to stay perfectly centered inside the fixed height */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.acym_module_form .acysubbuttons button.subbutton:hover {
    background-color: var(--ast-global-color-0) !important;
}

/* 2. Desktop Layout (Perfect Horizontal Synchronization) */
@media (min-width: 600px) {
    .acym_module_form {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: flex-start !important; /* Aligns both container tops to the exact same line */
    }

    .acym_form {
        width: 65% !important; /* Input container block width */
    }

    .acym_module_form .acym_form input.acym__user__edit__email[type="email"] {
        margin-bottom: 10px !important; /* Separates input from checkbox below without changing line-level */
    }

    .acysubbuttons {
        width: auto !important;
        margin-left: 15px !important; /* Perfect gap between input box and button */
    }

    .acym_module_form .acysubbuttons button.subbutton {
        width: auto !important; /* Shrinks button back to normal desktop dimensions */
    }

    .fieldacyterms {
        text-align: left !important; /* Snaps left perfectly flush with the text field box */
        padding-left: 2px !important;
        margin-bottom: 0 !important;
    }
}

/* ==========================================================================
   AcyMailing - Elegant Success Message Card
   ========================================================================== */

/* Target the success message container inside your form block */
.acym_fulldiv .acym_module_success.responseContainer {
    background-color: #ffffff !important; /* Crisp white background card */
    color: #1e293b !important; /* High-contrast dark slate text */
    font-size: 18px !important;
    font-weight: 500 !important;
    padding: 20px 30px !important;
    border-radius: 4px !important; /* Matches your input field corner radius */
    max-width: 610px !important; /* Matches the exact desktop width of the input + button */
    margin: 20px auto !important; /* Centers it perfectly within the blue section band */
    box-sizing: border-box !important;
    
    /* Subtle structural lines instead of loud full-box fills */
    border: 1px solid #e2e8f0 !important;
    border-left: 5px solid #10b981 !important; /* Premium emerald success indicator line on the left */
    
    /* Smooth modern depth elevation */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    text-align: center !important;
}

/* ==========================================================================
   DOWNLOAD MONITOR UNIFIED STYLESHEET
   Targets: Parish Bulletin Hero Card & Custom Accordion Archive
   ========================================================================== */

/* --- 1. PLUGIN RESET --- */
ul.dlm-downloads,
ul.dlm-downloads li {
    list-style: none !important;
    list-style-type: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* --- 2. BULLETIN HERO CARD --- */
.bulletin-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5fbfc 100%);
    border: 1px solid #CAE6E8;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 10px 25px rgba(41, 151, 170, 0.15);
}

.bulletin-hero-badge {
    position: absolute;
    top: -12px;
    left: 25px;
    background-color: #2997AA;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    z-index: 2;
}

.bulletin-hero-body h3 {
    margin: 0 0 6px 0 !important;
    color: #2c3e50;
    font-size: 1.4rem;
}

.bulletin-hero-meta {
    margin: 0;
    font-size: 0.88rem;
    color: #7f8c8d;
}

.bulletin-hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bulletin-hero-button {
    background-color: #2997AA;
    color: #ffffff !important;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease-in-out;
}

.bulletin-hero-button:hover {
    background-color: #3AA6B9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(58, 166, 185, 0.25);
}

.bulletin-hero-button-secondary {
    background-color: transparent !important;
    color: #2997AA !important;
    border: 2px solid #2997AA !important;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease-in-out;
}

.bulletin-hero-button-secondary:hover {
    background-color: #CAE6E8 !important;
    color: #2997AA !important;
    transform: translateY(-1px);
}

/* --- 3. ARCHIVE ACCORDION CONTAINER --- */
.archive-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.archive-accordion[open] {
    border-color: #2997AA;
    box-shadow: 0 10px 20px rgba(41, 151, 170, 0.06);
}

.archive-accordion summary {
    padding: 18px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    background: #fafcfc;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
    transition: background 0.2s ease;
}

.archive-accordion summary:hover {
    background: #CAE6E8;
}

.archive-accordion summary::-webkit-details-marker {
    display: none !important;
}
.archive-accordion summary {
    list-style: none !important;
}

.archive-accordion summary::before {
    content: "→";
    font-size: 1.1rem;
    font-weight: 700;
    color: #2997AA;
    transition: transform 0.25s ease;
    display: inline-block;
}

.archive-accordion[open] summary::before {
    transform: rotate(90deg);
}

/* --- 4. INNER ARCHIVE ENTRIES --- */
.archive-content {
    padding: 10px 24px 20px 24px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.archive-content ul.dlm-downloads li {
    position: relative !important;
    padding: 12px 0 12px 35px !important;
    border-bottom: 1px solid #f1f5f9;
    margin-left: 0 !important;
}

.archive-content ul.dlm-downloads li:last-child {
    border-bottom: none;
}

.archive-content ul.dlm-downloads li::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232997AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.archive-content ul.dlm-downloads li a {
    color: #454f5e !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-block;
}

.archive-content ul.dlm-downloads li a:hover {
    color: #2997AA !important;
}

/* --- 5. MOBILE RESPONSIVE ADAPTATIONS --- */
@media (max-width: 768px) {
    .bulletin-hero-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .bulletin-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .bulletin-hero-button,
    .bulletin-hero-button-secondary {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

/* ==========================================================================
   WORDPRESS NAVIGATION DROPDOWN FIX (HOMEPAGE TRANSPARENCY OVERRIDE)
   ========================================================================== */

/* 1. Force a solid card container for the dropdown menu on all pages */
.wp-block-navigation .wp-block-navigation__submenu-container,
.wp-block-navigation-submenu,
.main-navigation ul ul,
header .sub-menu {
    background-color: #ffffff !important;
    border-top: 3px solid #2c3e50 !important; /* Matches your dark line styling */
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08) !important; /* Smooth shadow elevation */
    border-radius: 0 0 8px 8px !important;
    padding: 10px 0 !important;
}

/* 2. Force link text inside the dropdown to stay dark blue/grey */
.wp-block-navigation .wp-block-navigation__submenu-container a,
.wp-block-navigation-submenu a,
.main-navigation ul ul a,
header .sub-menu a {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    display: block !important;
    padding: 10px 24px !important;
    transition: all 0.2s ease-in-out !important;
}

/* 3. Add an interactive color shift when hovering over submenu links */
.wp-block-navigation .wp-block-navigation__submenu-container a:hover,
.wp-block-navigation-submenu a:hover,
.main-navigation ul ul a:hover,
header .sub-menu a:hover {
    color: #2997AA !important; /* Turns into your theme primary teal */
    background-color: #fafcfc !important; /* Soft backdrop alert */
}
