/* =====================================================
   A NURSE'S DIARY - SHARED TOOL COMPONENT STYLES
   ===================================================== */
:root {
    --primary: #0f4a3b;
    --primary-hover: #135c49;
    --primary-light: #f0fdf4;
    --primary-border: #bbf7d0;
    --accent-orange: #f97316;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-title: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --shadow-card: 0 4px 20px -2px rgba(15, 74, 59, 0.05);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* ── Common Breadcrumb ── */
.cb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.cb-breadcrumb a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: color 0.2s;
}

.cb-breadcrumb a:hover {
    color: var(--primary-hover);
}

.cb-breadcrumb .sep {
    color: #cbd5e1;
    font-size: 0.85rem;
}

.cb-breadcrumb .current {
    color: #475569;
    font-weight: 700;
}

/* ── Medical Disclaimer & Privacy Notices ── */
.cb-notices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 4px;
}

@media (max-width: 720px) {
    .cb-notices-grid {
        grid-template-columns: 1fr;
    }
}

.cb-notice-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.cb-notice-card.disclaimer {
    border-left: 4px solid #f59e0b;
    background: #fffdfa;
}

.cb-notice-card.privacy {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.cb-notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-notice-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cb-notice-icon-box.disclaimer {
    background: #fef3c7;
    color: #d97706;
}

.cb-notice-icon-box.privacy {
    background: #dcfce7;
    color: #059669;
}

.cb-notice-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-title);
    margin: 0;
}

.cb-notice-text {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.55;
    margin: 0;
}

/* ── Social Media Share Card ── */
.cb-share-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
}

.cb-share-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cb-share-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
}

.cb-share-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid var(--primary-border);
}

.cb-share-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cb-share-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text-title);
    margin: 0;
}

.cb-share-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.cb-share-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cb-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #ffffff;
    font-family: inherit;
}

.cb-share-btn.whatsapp {
    background: #25d366;
}

.cb-share-btn.whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cb-share-btn.facebook {
    background: #1877f2;
}

.cb-share-btn.facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.cb-share-btn.twitter {
    background: #0f172a;
}

.cb-share-btn.twitter:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.cb-share-btn.copylink {
    background: #f1f5f9;
    color: #334155;
    border: 1.5px solid #cbd5e1;
}

.cb-share-btn.copylink:hover,
.cb-share-btn.copylink.copied {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}


/* =====================================================
   TOOLS ADVERTISING SYSTEM (Banners, Sidebars, Popups)
   ===================================================== */

/* ── Three-Column Page Layout with Sidebars ── */
.tool-ad-layout-wrapper {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
}

.tool-ad-main-col {
    flex: 1;
    max-width: 1020px;
    min-width: 0;
    width: 100%;
}

.tool-ad-sidebar-col {
    width: 180px;
    flex-shrink: 0;
    display: none;
}

@media (min-width: 1280px) {
    .tool-ad-sidebar-col {
        display: block;
    }
}

.tool-ad-sidebar-sticky {
    position: sticky;
    top: 90px;
    width: 100%;
}

/* ── Ad Slot Base ── */
.tool-ad-slot {
    display: none;
    background: transparent;
    text-align: center;
    overflow: hidden;
    margin: 0 auto;
}

.tool-ad-slot.active {
    display: block;
}

/* Top Banner */
.tool-ad-slot.top-banner {
    max-width: 1020px;
    width: 100%;
    margin: 94px auto 20px;
    min-height: 50px;
}

/* Bottom Banner */
.tool-ad-slot.bottom-banner {
    max-width: 1020px;
    width: 100%;
    margin: 25px auto 15px;
    min-height: 50px;
}

/* Sidebar Ads */
.tool-ad-slot.sidebar-ad {
    width: 100%;
    min-height: 250px;
}

/* ── Popup Ad Modal ── */
.tool-popup-ad-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tool-popup-ad-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tool-popup-ad-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    max-width: 550px;
    width: 100%;
    overflow: hidden;
    animation: toolPopupZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-light);
}

@keyframes toolPopupZoom {
    from {
        transform: scale(0.92) translateY(15px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.tool-popup-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.tool-popup-ad-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-popup-ad-close {
    background: #e2e8f0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: #475569;
    transition: all 0.2s ease;
}

.tool-popup-ad-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

.tool-popup-ad-body {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-height: 80vh;
    overflow-y: auto;
}

.tool-popup-ad-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}