/* =====================================================
   Islamic Will Generator — style-tooltips.css
   Tooltip styles — works with both style.css and style-blue.css
   ===================================================== */

/* ── Top navigation bar ── */
.topbar{background:var(--navy);padding:.6rem 2rem;display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--gold)}
.topbar-brand{font-family:'Outfit',sans-serif;font-size:.9rem;font-weight:500;color:rgba(255,255,255,.7);letter-spacing:.08em;text-transform:uppercase;text-decoration:none}
.topbar-brand span{color:var(--gold)}
.topbar-cta{font-family:'Outfit',sans-serif;font-size:.88rem;font-weight:600;color:var(--gold);text-decoration:none;border:1px solid rgba(201,150,46,.5);padding:.3rem .9rem;border-radius:3px;transition:background .2s}
.topbar-cta:hover{background:rgba(201,150,46,.12)}

.top-nav {
    background: #1c2951;
    padding: .5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    border-bottom: 1px solid rgba(201,150,46,.3);
}
.nav-brand {
    font-family: Arial, sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: #c9962e;
    text-decoration: none;
    letter-spacing: .04em;
}
.nav-links {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
}
.nav-links a {
    font-family: Arial, sans-serif;
    font-size: .82rem;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: color .2s;
}
.nav-links a:hover { color: #fff; }

/* ── Tooltip wrapper sits inline after label text ── */
.tip-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: .35rem;
}

/* The ⓘ button */
.tip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #1c2951;
    background: transparent;
    color: #1c2951;
    font-size: .78rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background .15s, color .15s;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: normal;
}
.tip-btn:hover,
.tip-btn:focus {
    background: #1c2951;
    color: #fff;
    outline: none;
}

/* The tooltip box — hidden by default */
.tip-box {
    display: none;          /* hidden until .tip-open added by JS */
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 280px;
    background: #1c2951;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: .82rem;
    font-weight: normal;
    font-style: normal;
    line-height: 1.55;
    padding: .65rem .85rem;
    border-radius: 5px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    z-index: 100;
    text-align: left;
    pointer-events: none;
}

/* Arrow */
.tip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1c2951;
}

/* Show when JS adds this class */
.tip-box.tip-open {
    display: block;
}

/* On small screens, pin tooltip to left edge */
@media (max-width: 480px) {
    .tip-box {
        left: 0;
        transform: none;
        min-width: 200px;
    }
    .tip-box::after {
        left: 18px;
        transform: none;
    }
    .nav-links { gap: .8rem; }
}
