/*
 * mapsite-core :: site-wide green accent theme
 * Loaded on EVERY front-end page (see includes/assets.php), on top of the
 * active theme (GeneratePress). Restrained accent layer, not a repaint.
 *
 * Reusable by design: every color lives in a CSS custom property on :root,
 * so a sibling map-site can override just the variables (e.g. in a child
 * theme or a small inline style block) to reskin without touching selectors.
 */

:root {
    --mapsite-green: #1a6b3c;       /* primary accent — passes WCAG AA (≥4.5:1) on white */
    --mapsite-green-dark: #12522d;  /* hover / active states */
    --mapsite-green-light: #e8f3ec; /* tints, subtle backgrounds, borders */
    --mapsite-ink: #1f2d27;         /* accent-adjacent heading/text ink */
}

/* ---------------------------------------------------------------------
 * Links inside content
 * ------------------------------------------------------------------- */
.entry-content a,
.site-content a,
.comment-content a {
    color: var(--mapsite-green);
    text-decoration-color: transparent;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.entry-content a:hover,
.entry-content a:focus,
.site-content a:hover,
.site-content a:focus,
.comment-content a:hover,
.comment-content a:focus {
    color: var(--mapsite-green-dark);
    text-decoration: underline;
    text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------------
 * Headings — subtle accent, not a full repaint
 * ------------------------------------------------------------------- */
.entry-content h2 {
    padding-bottom: 0.35em;
    border-bottom: 2px solid var(--mapsite-green-light);
}

.entry-content h3 {
    padding-left: 0.6em;
    border-left: 3px solid var(--mapsite-green);
}

/* ---------------------------------------------------------------------
 * Buttons / Gutenberg button blocks
 * ------------------------------------------------------------------- */
.entry-content .wp-block-button__link,
.entry-content .button,
.entry-content input[type="submit"] {
    background-color: var(--mapsite-green);
    border-color: var(--mapsite-green);
    color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus,
.entry-content .button:hover,
.entry-content .button:focus,
.entry-content input[type="submit"]:hover,
.entry-content input[type="submit"]:focus {
    background-color: var(--mapsite-green-dark);
    border-color: var(--mapsite-green-dark);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--mapsite-green);
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:focus {
    background-color: var(--mapsite-green-light);
    color: var(--mapsite-green-dark);
}

/* ---------------------------------------------------------------------
 * Blockquotes / horizontal rules
 * ------------------------------------------------------------------- */
.entry-content blockquote {
    border-left: 4px solid var(--mapsite-green);
    background: var(--mapsite-green-light);
    padding: 0.8em 1.2em;
    margin: 1.5em 0;
    color: var(--mapsite-ink);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content hr {
    border: none;
    border-top: 2px solid var(--mapsite-green-light);
    margin: 2em 0;
}

/* ---------------------------------------------------------------------
 * Tables — same accent language as the map shortcode's .mapsite-table
 * ------------------------------------------------------------------- */
.entry-content table:not(.mapsite-table) {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

.entry-content table:not(.mapsite-table) th,
.entry-content table:not(.mapsite-table) td {
    border: 1px solid #e2e2e2;
    padding: 8px 10px;
    text-align: left;
}

.entry-content table:not(.mapsite-table) thead th {
    background: var(--mapsite-green);
    color: #fff;
}

.entry-content table:not(.mapsite-table) tbody tr:nth-child(even) {
    background: var(--mapsite-green-light);
}

/* ---------------------------------------------------------------------
 * Responsive safety — no fixed widths, wrap wide tables instead of
 * letting them break mobile layouts
 * ------------------------------------------------------------------- */
.entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 641px) {
    .entry-content table {
        display: table;
        overflow-x: visible;
    }
}

@media (max-width: 640px) {
    .entry-content blockquote {
        padding: 0.6em 0.9em;
        margin: 1.2em 0;
    }
}
