/**
 * MUI V2 Tag Stylesheet.
 * Scoped strictly under body.mui-v2-tag-template #mui-v2-tag
 */

/* Rescue visibility for tag template containers */
body.mui-v2-tag-template #mui-v2-page-root,
body.mui-v2-tag-template #mui-v2-tag,
body.mui-v2-tag-template #mui-v2-page-content,
body.mui-v2-tag-template section {
    display: block !important;
    visibility: visible !important;
}

body.mui-v2-tag-template #mui-v2-tag {
    isolation: isolate !important;
    font-family: BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

body.mui-v2-tag-template #mui-v2-tag a {
    text-decoration: none !important;
    color: inherit;
    transition: color 180ms ease !important;
}

body.mui-v2-tag-template #mui-v2-tag a:hover {
    text-decoration: none !important;
}

/* Guard post titles from theme link overrides */
body.mui-v2-tag-template #mui-v2-tag h3 a,
body.mui-v2-tag-template #mui-v2-tag h3 a:visited {
    color: #1D1D1F !important;
}

body.mui-v2-tag-template #mui-v2-tag h3 a:hover {
    color: #0267B2 !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag h3 a,
html.dark body.mui-v2-tag-template #mui-v2-tag h3 a:visited {
    color: #FFFFFF !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag h3 a:hover {
    color: #2d99e4 !important;
}

body.mui-v2-tag-template #mui-v2-tag .text-primary-hover:hover {
    color: #0267B2 !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag .text-primary-hover:hover {
    color: #2d99e4 !important;
}

/* Author Links Guard */
body.mui-v2-tag-template #mui-v2-tag .mui-v2-news-author-link {
    color: #6E6E73 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 180ms ease !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-news-author-link:hover {
    color: #0267B2 !important;
    text-decoration: underline !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-news-author-link {
    color: #A1A1A6 !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-news-author-link:hover {
    color: #2d99e4 !important;
}

/* Pagination UI matching mockup */
body.mui-v2-tag-template #mui-v2-tag #news-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    gap: 6px !important;
}

body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers {
    display: inline-flex !important;
    height: 36px !important;
    width: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 9999px !important;
    border: 1px solid #E5E5E7 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1D1D1F !important;
    background: transparent !important;
    transition: all 180ms ease !important;
    text-decoration: none !important;
    margin: 0 3px !important;
    cursor: pointer !important;
}

body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers:hover {
    background: #F5F5F7 !important;
    color: #1D1D1F !important;
}

body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers.current {
    background: #0267B2 !important;
    border-color: #0267B2 !important;
    color: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers.next,
body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers.prev {
    width: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* Dark mode for pagination */
html.dark body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers {
    border-color: #2D2D34 !important;
    color: #FFFFFF !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers:hover {
    background: #1E1E22 !important;
    color: #FFFFFF !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag #news-pagination .page-numbers.current {
    background: #0267B2 !important;
    border-color: #0267B2 !important;
}

/* Elementor Form styling inside newsletter box */
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form {
    width: 100% !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form *,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form *::before,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form *::after {
    box-sizing: border-box !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-section,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-container,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-column,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-widget-wrap,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-widget,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-widget-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form form.elementor-form,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-form-fields-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-form-fields-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: 576px !important;
    width: 100% !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field-group:not(.elementor-field-type-submit),
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form [class*="elementor-col-"]:not(.elementor-field-type-submit) {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field-group.elementor-field-type-submit,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form [class*="elementor-col-"].elementor-field-type-submit {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="email"],
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="text"],
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 9999px !important;
    border: 1px solid #E5E5E7 !important;
    background: #FFFFFF !important;
    color: #1D1D1F !important;
    padding: 0 20px !important;
    font-size: 14px !important;
    line-height: 20px !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="email"]:focus,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="text"]:focus,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field:focus {
    border-color: #0267B2 !important;
    box-shadow: 0 0 0 3px rgba(2, 103, 178, 0.10) !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"],
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button {
    height: 46px !important;
    min-height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: 9999px !important;
    background: #0267B2 !important;
    color: #FFFFFF !important;
    padding: 0 28px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: background 180ms ease !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"]:hover,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button:hover {
    background: #2d99e4 !important;
    color: #FFFFFF !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button-content-wrapper,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button-text,
body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"] span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    line-height: 20px !important;
}

body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-message {
    margin-top: 8px !important;
    font-size: 12px !important;
    line-height: 18px !important;
}

/* Dark mode for Newsletter Form */
html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="email"],
html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form input[type="text"],
html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field {
    background: #1E1E22 !important;
    border-color: #2D2D34 !important;
    color: #FFFFFF !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"],
html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button {
    background: #0267B2 !important;
}

html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"]:hover,
html.dark body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button:hover {
    background: #2d99e4 !important;
}

@media (max-width: 640px) {
    body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-form-fields-wrapper {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-field-group,
    body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form [class*="elementor-col-"] {
        width: 100% !important;
        flex: 0 0 auto !important;
    }
    body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form button[type="submit"],
    body.mui-v2-tag-template #mui-v2-tag .mui-v2-newsletter-form .elementor-button {
        width: 100% !important;
    }
}
