/*
 * Harbor Home Healthcare — Frontend Fixes CSS
 * Version: 5.0 | 2026-04-06
 *
 * FILE: /wp-content/themes/YOUR-CHILD-THEME/css/harbor-frontend-fixes.css
 *
 * ⚠️  CUSTOM-THEME EDITION
 *     Embed mode (section 4) uses GENERIC selectors (.site-header, .site-footer,
 *     #masthead, #colophon, .main-navigation, .nav-menu) instead of Astra-specific
 *     classes. Update those selectors to match your actual theme markup if needed.
 *
 * SECTIONS:
 *  1. PHONE WIDGET
 *  2. FOOTER
 *  3. MOBILE MENU — overflow fix + z-index
 *  4. EMBED MODE — strips theme chrome when ?embed=1 is in URL
 *  5. COPY PROTECTION — light CSS user-select deterrence
 *  6. COMPLAINTS PAGE
 *  7. MOBILE RESPONSIVE
 */

/* =============================================================================
 * 1. PHONE WIDGET
 *    Rendered by [harbor_phone_header] shortcode.
 * ============================================================================= */

.harbor-phone-widget {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 1.2;
}
.harbor-phone-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(122, 31, 43, 0.1);
    color: #7a1f2b;
    flex-shrink: 0;
}
.harbor-phone-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.harbor-phone-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: #6b7280;
    line-height: 1;
}
.harbor-phone-number {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
}
.harbor-phone-number:hover { color: #7a1f2b; }
.harbor-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}
.harbor-phone-badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}


/* =============================================================================
 * 2. FOOTER
 * ============================================================================= */

.harbor-brand {
    display: inline !important;
    white-space: nowrap !important;
    font-weight: 900 !important;
}
.harbor-footer-brand { margin-bottom: 12px; }

.harbor-footer-service-areas .widget-title,
.harbor-footer-service-areas p.widget-title {
    color: #22c55e !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    margin-bottom: 8px !important;
    display: block;
}
.footer-service-area-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px;
    line-height: 1.9;
}
.footer-service-area-list li {
    color: rgba(255, 255, 255, 0.82) !important;
    display: block;
}
.footer-service-area-list li::before {
    content: '→ ';
    color: #22c55e !important;
    font-weight: 700;
}


/* =============================================================================
 * 3. MOBILE MENU
 *    JS (harbor-frontend-fixes.js) patches overflow-x:hidden on .page-wrapper.
 *    These z-index rules ensure the nav always sits above the policy sidebar.
 *
 *    ⚠️  Update selectors below to match YOUR theme's actual header/nav markup.
 * ============================================================================= */

/* Generic selectors that work for most themes */
.site-header,
header.site-header {
    z-index: 9999 !important;
    position: relative;
}
.main-navigation,
.nav-menu-wrapper,
.mobile-nav-drawer,
.header-navigation {
    z-index: 9990 !important;
}
.menu-toggle,
button.menu-toggle {
    z-index: 9999 !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Policy sidebar lower z-index on mobile */
@media (max-width: 1024px) {
    .sidebar-wrapper  { z-index: 900 !important; }
    .sidebar-expanded { z-index: 910 !important; }
    .sidebar-overlay  { z-index: 905 !important; }
}

/* Belt-and-braces clip fix (JS also applies at runtime) */
@supports (overflow-x: clip) {
    body.single-policies .page-wrapper {
        overflow-x: clip !important;
    }
}


/* =============================================================================
 * 4. EMBED MODE
 *
 *    When ?embed=1 is in the URL:
 *      - JS adds body class 'harbor-embed-mode'
 *      - CSS hides site chrome, leaving only policy content
 *
 *    ⚠️  UPDATE SELECTORS to match your custom theme's actual header/footer:
 *      - Find your header element: inspect → look for class or ID on <header>
 *      - Find your footer element: inspect → look for class or ID on <footer>
 *      - Add those selectors below.
 *
 *    The selectors listed here cover:
 *      • Generic WordPress: #masthead, .site-header, .site-footer, #colophon
 *      • Common nav: .main-navigation, .nav-menu, .primary-navigation
 *      • Admin bar: #wpadminbar
 *      • WP standard content areas that aren't the policy body
 * ============================================================================= */

body.harbor-embed-mode #wpadminbar,
body.harbor-embed-mode .site-header,
body.harbor-embed-mode #masthead,
body.harbor-embed-mode header.site-header,
body.harbor-embed-mode .site-footer,
body.harbor-embed-mode footer.site-footer,
body.harbor-embed-mode #colophon,
body.harbor-embed-mode .main-navigation,
body.harbor-embed-mode .nav-menu,
body.harbor-embed-mode .primary-navigation,
body.harbor-embed-mode .breadcrumb-area,
body.harbor-embed-mode .entry-meta,
body.harbor-embed-mode .post-navigation,
body.harbor-embed-mode .comments-area,
body.harbor-embed-mode .sidebar-wrapper,
body.harbor-embed-mode .sidebar-expanded,
body.harbor-embed-mode .sidebar-overlay,
/* ── ADD YOUR CUSTOM THEME HEADER/FOOTER SELECTORS HERE: ── */
body.harbor-embed-mode .your-theme-header,
body.harbor-embed-mode .your-theme-footer {
    display: none !important;
}

body.harbor-embed-mode {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background: #fff !important;
}

/* Full-width policy content in embed mode */
body.harbor-embed-mode .hp-page-wrap {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 12px 20px !important;
    max-width: 100% !important;
}
body.harbor-embed-mode .hp-sidebar {
    display: none !important;
}


/* =============================================================================
 * 5. COPY PROTECTION — light CSS deterrence
 * ============================================================================= */

body.harbor-copy-protect {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
body.harbor-copy-protect input,
body.harbor-copy-protect textarea,
body.harbor-copy-protect select,
body.harbor-copy-protect [contenteditable],
body.harbor-copy-protect a,
body.harbor-copy-protect button,
body.harbor-copy-protect label,
body.harbor-copy-protect summary,
body.harbor-copy-protect details,
body.harbor-copy-protect #wpadminbar {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: default;
}


/* =============================================================================
 * 6. COMPLAINTS PAGE
 * ============================================================================= */

.harbor-complaints-wrap { max-width: 900px; }
.harbor-complaints-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 22px 24px;
}
.harbor-complaints-section h3 {
    font-size: 16px; font-weight: 800; color: #0d2f52;
    margin: 0 0 12px; border-bottom: 2px solid #e5e7eb; padding-bottom: 10px;
}
.harbor-complaints-section address {
    font-style: normal; font-size: 14px; line-height: 1.9; color: #374151;
}
.harbor-hotline-number {
    font-size: 18px; font-weight: 900; color: #7a1f2b;
    display: block; margin: 4px 0; text-decoration: none;
}
.harbor-hotline-badge {
    display: inline-block; background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 800; padding: 2px 8px;
    border-radius: 999px; margin-left: 8px; vertical-align: middle;
}
.harbor-complaints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px; margin-top: 20px;
}
@media (max-width: 600px) { .harbor-complaints-grid { grid-template-columns: 1fr; } }


/* =============================================================================
 * 7. MOBILE RESPONSIVE
 * ============================================================================= */

@media (max-width: 768px) {
    a[href^="tel"] {
        display: inline-flex; align-items: center; gap: 6px;
        min-height: 44px; padding: 4px 0;
    }
    .harbor-phone-number { font-size: 16px !important; }
}