/**
 * Custom CSS Overrides
 * These styles override compiled SCSS that cannot be recompiled
 *
 * @package Bucksalc
 */

/* Top Header Navigation Adjustments */
@media only screen and (min-width: 768px) {
    .top-header .container a {
        padding: 10px 12px;
        font-size: 1rem;
    }
}

/* Content Error Message Styling */
.content-error-message {
    max-width: var(--container-max-width, 1280px);
    margin: 3rem auto;
    padding: 2rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 1.125rem;
    text-align: center;
}

/* Theme My Login Styling */
.tml.tml-login {
    max-width: 500px;
    margin: 3rem auto;
}

.tml-field-wrap {
    margin-bottom: 1.5rem;
}

.tml-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.tml-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.tml-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.tml-rememberme-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tml-rememberme-wrap .tml-checkbox {
    width: auto;
    margin: 0;
}

.tml-rememberme-wrap .tml-label {
    margin: 0;
    font-weight: 400;
}

.tml-button {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tml-button:hover {
    background-color: #0056b3;
}

.tml-links {
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
    text-align: center;
}

.tml-links a {
    color: #007bff;
    text-decoration: none;
}

.tml-links a:hover {
    text-decoration: underline;
}

/* =============================================
   CONTAINER WIDTH (migrated from plugin)
   ============================================= */

@media only screen and (min-width: 768px) {
    .container {
        max-width: var(--container-max-width, 1280px);
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =============================================
   FLUID TEXT MOBILE PADDING
   ============================================= */

@media only screen and (max-width: 768px) {
    .fluid_text {
        padding: 0 10px;
    }
}

/* =============================================
   COOKIE MANAGER BUTTONS
   ============================================= */

.cm-button-row button,
.cm-filter-group button {
    padding: 10px;
    border-radius: 4px;
}

/* =============================================
   FOOTER
   ============================================= */

#footer .inner,
#footer .bottom-footer .inner {
    margin: 0 auto;
    max-width: var(--container-max-width, 1280px);
    width: 100%;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */

p {
    line-height: 24px;
}

/* =============================================
   MODULE LINK COLORS (White text on colored backgrounds)
   ============================================= */

.mb-back-button a,
.dl-category-card a,
.dl-document-content a,
.dl-navigation a,
a.cd-view-council,
.cd-back-button a {
    color: #ffffff;
}

/* =============================================
   DOCUMENT LIBRARY
   ============================================= */

.dl-category-title {
    min-height: 65px;
}

/* =============================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================= */

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* WordPress image block alignment */
.wp-block-image.aligncenter {
    text-align: center;
}

.wp-block-image.aligncenter figure,
.wp-block-image.aligncenter img {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-image figure.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.wp-block-image figure.aligncenter img {
    margin-left: auto;
    margin-right: auto;
}

/* Add spacing below images */
.wp-block-image {
    margin-bottom: 1.5rem;
}

.wp-block-image img {
    margin-bottom: 0;
}

/* =============================================
   SINGLE POST STYLES
   ============================================= */

/* Post Breadcrumbs */
.single-post-breadcrumbs {
    background-color: #f5f5f5;
    padding: 10px 0;
}

.single-post-breadcrumbs #breadcrumbs,
.single-post-breadcrumbs #breadcrumbs p {
    color: #666;
    font-size: 0.875rem;
    margin: 0;
}

.single-post-breadcrumbs #breadcrumbs a {
    color: var(--color-primary, #2E2766);
    text-decoration: none;
    transition: color 0.3s ease;
}

.single-post-breadcrumbs #breadcrumbs a:hover {
    color: var(--color-secondary, #12ade5);
}

/* Post Header */
.single-post-header {
    background-color: var(--color-primary, #2E2766);
    color: #ffffff;
    padding: 3rem 0;
}

.single-post-header__inner {
    text-align: center;
}

.single-post-meta {
    margin-bottom: 1rem;
}

.single-post-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-decoration: none;
    margin: 0 0.25rem;
    transition: background-color 0.2s ease;
}

.single-post-category:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.single-post-title {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: #ffffff;
    line-height: 1.2;
}

.single-post-date {
    font-size: 1rem;
    opacity: 0.8;
}

/* Post Layout */
.single-post-wrapper {
    padding: 3rem 0;
}

.single-post-layout {
    display: grid;
    gap: 3rem;
}

.single-post-layout.has-sidebar {
    grid-template-columns: 1fr 300px;
}

.single-post-layout.no-sidebar {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* Featured Image */
.single-post-featured-image {
    margin-bottom: 2rem;
}

.single-post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Entry Content */
.single-post-content .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.single-post-content .entry-content p {
    margin-bottom: 1.5rem;
}

.single-post-content .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.single-post-content .entry-content h3,
.single-post-content .entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

/* =============================================
   WCAG COMPLIANT LINK STYLING
   Links in content areas must be visually
   distinguishable (not just by color alone)
   ============================================= */

/* Single Post Content Links */
.single-post-content .entry-content a {
    color: var(--color-primary, #2E2766);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.single-post-content .entry-content a:hover,
.single-post-content .entry-content a:focus {
    color: var(--color-secondary, #12ade5);
}

/* Fluid Text Block Content Links */
.fluid_text article a,
.fluid_text2 article a {
    color: var(--color-primary, #2E2766);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fluid_text article a:hover,
.fluid_text article a:focus,
.fluid_text2 article a:hover,
.fluid_text2 article a:focus {
    color: var(--color-secondary, #12ade5);
}

/* General Page Content Links */
.page-content a,
.entry-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Exclude navigation, buttons, and UI elements from underline */
.fluid_text article a.button,
.fluid_text article a.btn,
.fluid_text2 article a.button,
.fluid_text2 article a.btn,
.single-post-content .entry-content a.button,
.single-post-content .entry-content a.btn,
.page-content a.button,
.page-content a.btn,
.entry-content a.button,
.entry-content a.btn,
nav a,
.nav a,
.menu a,
.tml-links a,
.single-post-navigation a {
    text-decoration: none;
}

/* Post Navigation */
.single-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.single-post-navigation a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    max-width: 45%;
}

.single-post-navigation .nav-previous {
    align-items: flex-start;
}

.single-post-navigation .nav-next {
    align-items: flex-end;
    margin-left: auto;
}

.single-post-navigation .nav-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.single-post-navigation .nav-title {
    color: var(--color-primary, #2E2766);
    font-weight: 600;
    transition: color 0.2s ease;
}

.single-post-navigation a:hover .nav-title {
    color: var(--color-secondary, #12ade5);
}

/* Sidebar */
.single-post-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.single-post-sidebar .widget {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.single-post-sidebar .widget-title {
    font-size: 1.125rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary, #2E2766);
}

.single-post-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.single-post-sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.single-post-sidebar .widget li:last-child {
    border-bottom: none;
}

.single-post-sidebar .widget a {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-post-sidebar .widget a:hover {
    color: var(--color-primary, #2E2766);
}

/* Responsive */
@media (max-width: 1024px) {
    .single-post-layout.has-sidebar {
        grid-template-columns: 1fr;
    }

    .single-post-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .single-post-header {
        padding: 2rem 0;
    }

    .single-post-title {
        font-size: 1.75rem;
    }

    .single-post-wrapper {
        padding: 2rem 0;
    }

    .single-post-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }

    .single-post-navigation a {
        max-width: 100%;
    }

    .single-post-navigation .nav-next {
        align-items: flex-start;
    }
}

/* =============================================
   SITE ALERT BANNER
   ============================================= */

.site-alert-banner {
    background-color: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    padding: 12px 0;
}

.site-alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.site-alert-icon {
    flex-shrink: 0;
    color: #b45309;
}

.site-alert-icon svg {
    display: block;
}

.site-alert-text {
    margin: 0;
    color: #92400e;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.site-alert-text a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.site-alert-text a:hover {
    color: #78350f;
}

@media (max-width: 768px) {
    .site-alert-banner {
        padding: 10px 0;
    }

    .site-alert-content {
        gap: 10px;
    }

    .site-alert-text {
        font-size: 0.875rem;
    }
}
