/* ==========================================================================
   samata.lk Horoscope — tools.css (shared by tool pages: birth details form,
   result header, notices, fact cards, boxes, tables)
   Mobile-first. No !important, no override rules.
   ========================================================================== */

/* Form ------------------------------------------------------------------- */
.birth-form-wrap {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.birth-form-wrap__toggle {
    padding: 12px 16px;
    font-weight: 700;
    color: var(--c-blue);
    cursor: pointer;
}

.birth-form-wrap[open] .birth-form-wrap__toggle { border-bottom: 1px solid var(--c-line); }

.birth-form { display: grid; gap: 14px; padding: 16px; }

.field { display: grid; gap: 6px; }
.field[hidden] { display: none; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.field__label { font-size: 14px; font-weight: 600; }

.date-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.date-field .field__label { padding: 0; margin-bottom: 6px; }
.date-field__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1.2fr); gap: 8px; }

.field__input {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--c-text);
    font: inherit;
}

.field__input--lg { min-height: 52px; padding: 10px 14px; border-width: 2px; font-size: 16px; }
.field__input:focus { border-color: var(--c-blue); outline: none; box-shadow: 0 0 0 3px rgba(26, 95, 170, .15); }
.field__input:disabled { background: var(--c-bg); color: var(--c-muted); }
.field__hint { font-size: 12px; color: var(--c-muted); }
.field__error { font-size: 13px; color: #b91c1c; font-weight: 600; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--c-navy); }

/* Place search */
.place { position: relative; }

.place__list {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 280px;
    overflow-y: auto;
}

.place__item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.place__item small { color: var(--c-muted); }
.place__item.is-active,
.place__item:hover { background: var(--c-bg); }
.place__empty { padding: 9px 10px; font-size: 14px; color: var(--c-muted); }

.more__toggle { font-size: 14px; color: var(--c-blue); cursor: pointer; }
.more[open] .more__toggle { margin-bottom: 10px; }

.birth-form__submit { width: 100%; }

/* Result ------------------------------------------------------------------ */
.result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.result__head { display: grid; gap: 10px; }
.result__title { font-size: 20px; }
.result__born { margin: 0; color: var(--c-muted); font-size: 14px; }
.result__pdf,
.result__actions { justify-self: start; }
.result__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result__pdf.is-busy { opacity: .7; cursor: progress; }

.notice {
    margin: 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: #fff6e5;
    border: 1px solid #f6d9a8;
    color: #8a4b00;
    font-size: 14px;
}

.notice--ok { background: #e6f6ec; border-color: #b7e4c7; color: #17733f; }
.notice--test { background: #eef4fb; border-color: #cfe0f3; color: var(--c-deep); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.fact {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 12px;
}

.fact small { display: block; font-size: 12px; color: var(--c-muted); }
.fact strong { display: block; font-size: 16px; line-height: 1.35; }
.fact span { font-size: 13px; color: var(--c-muted); }
.fact__alt { display: block; margin-top: 2px; font-size: 11px; font-style: normal; color: #94a3b8; }

/* Tables */
.box {
    background: var(--c-card);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 14px;
}

.box__title { font-size: 16px; margin-bottom: 10px; }
.box__lead { margin: 0 0 10px; font-size: 14px; }
.box__note { margin: 10px 0 0; font-size: 12px; color: var(--c-muted); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--c-muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid #f1f4f8; white-space: nowrap; }

@media (min-width: 768px) {
    .field-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; }
    .birth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px; }
    .birth-form > .field:first-of-type,
    .birth-form > .place,
    .birth-form > .more,
    .birth-form > .check,
    .birth-form__submit { grid-column: 1 / -1; }
    .birth-form > .field-row { grid-column: 1 / -1; }
    .birth-form__submit { width: auto; justify-self: start; padding-inline: 28px; }
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .result__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .result__head > :not(.result__pdf, .result__actions) { grid-column: 1; }
    .result__head > .result__pdf,
    .result__head > .result__actions { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
}

/* Recommended astrologer card (partials/astrologer.blade.php) */
.astro-promo {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 22px;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1b1446 0%, #2b1d6b 55%, #3d2a8a 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(43, 29, 107, .25);
}
.astro-promo::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, .28), transparent 70%);
}
.astro-promo__art { width: 76px; height: 76px; color: var(--c-gold); }
.astro-promo__art svg { width: 76px; height: 76px; }
.astro-promo__body { position: relative; z-index: 1; display: grid; gap: 10px; }
.astro-promo__badge {
    justify-self: start;
    margin: 0;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(245, 166, 35, .18);
    border: 1px solid rgba(245, 166, 35, .5);
    color: #ffd27a;
    font-size: 12px;
    font-weight: 700;
}
.astro-promo__title { margin: 0; font-size: 24px; color: #fff; }
.astro-promo__why { margin: 0; font-size: 14px; line-height: 1.6; color: #d6d0f5; }
.astro-promo__lead { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.astro-promo__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}
.astro-promo__list li::before { content: "✓ "; color: var(--c-gold); font-weight: 800; }
.astro-promo__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    justify-self: start;
    padding: 13px 22px;
    border-radius: 999px;
    background: #25d366;
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(37, 211, 102, .35);
}
.astro-promo__btn:hover { background: #1ebe5b; }
.astro-promo__note { margin: 0; font-size: 12px; color: #b9b2e6; }

@media (min-width: 768px) {
    .astro-promo { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 26px 30px; gap: 26px; }
    .astro-promo__art,
    .astro-promo__art svg { width: 110px; height: 110px; }
    .astro-promo__list { grid-template-columns: repeat(4, auto); justify-content: start; }
}

@media (max-width: 480px) {
    .astro-promo { padding: 20px 18px; }
    .astro-promo__btn { justify-self: stretch; padding: 13px 14px; font-size: 15px; }
    .astro-promo__btn svg { width: 20px; height: 20px; flex: none; }
}

@media (max-width: 380px) {
    .astro-promo__btn { gap: 8px; padding: 12px 10px; font-size: 14px; }
}

/* Free-login box (guests): unlocks the rest of a reading and the PDF --------- */
.login-lock { display: grid; gap: 10px; justify-items: start; border: 2px solid var(--c-gold); background: #fffdf7; }
.login-lock__badge { padding: 3px 12px; border-radius: 999px; background: #fff1d6; color: #8a5300; font-size: 13px; font-weight: 700; }
.login-lock__title { margin: 0; font-size: 19px; }
.login-lock__text { margin: 0; font-size: 14px; color: var(--c-muted); }
.login-lock__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.login-lock__note { margin: 0; font-size: 12px; color: var(--c-muted); }
.login-lock__teaser { display: grid; gap: 1px; width: 100%; margin: 0; padding: 0; list-style: none; border: 1px solid var(--c-line); border-radius: var(--radius-sm); overflow: hidden; }
.login-lock__teaser li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; background: var(--c-card); font-size: 14px; font-weight: 600; }
.login-lock__teaser i { flex: none; width: 84px; height: 22px; border-radius: 999px; background: linear-gradient(90deg, #e9edf3, #f5f7fa); }
.login-lock__teaser li:nth-child(n+5) { opacity: .55; }
.login-lock__preview { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.login-lock__preview li { padding: 10px 12px; border-radius: var(--radius-sm); background: linear-gradient(90deg, #eef2f7, #f8fafc); color: #94a3b8; font-weight: 700; }
.login-lock__preview li::after { content: " 🔒"; }
@media (max-width: 480px) {
    .login-lock__actions { display: grid; width: 100%; }
    .login-lock__actions .btn { text-align: center; }
}

/* Horoscope details (proposal step result + proposal page) ------------------- */
.horo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.horo-facts__item { padding: 8px 10px; border-radius: var(--radius-sm); background: #fff; border: 1px solid #f0e3c0; }
.horo-facts dt { color: #8a6a12; font-size: 12px; font-weight: 700; }
.horo-facts dd { margin: 0; color: var(--c-navy); font-weight: 700; }
.horo-facts__item.is-locked dd { color: #8a8f99; font-weight: 600; }

/* "We can help" strip (sign-in, proposals list, sign-up box) ----------------- */
.help-strip { display: grid; gap: 10px; align-items: center; padding: 14px 16px; border: 1px solid #cfe8d7; border-radius: var(--radius); background: linear-gradient(135deg, #f1fbf4, #fff); }
.help-strip__text { display: grid; gap: 2px; margin: 0; color: #475569; font-size: 14px; line-height: 1.5; }
.help-strip__text strong { color: var(--c-navy); font-size: 15px; }
.help-strip__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.help-strip__btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--c-line); border-radius: 999px; background: #fff; color: var(--c-navy); font-size: 14px; font-weight: 700; text-decoration: none; }
.help-strip__btn--wa { border-color: #25d366; background: #25d366; color: #fff; }
.help-strip--compact { padding: 12px; }
@media (min-width: 720px) {
    .help-strip:not(.help-strip--compact) { grid-template-columns: minmax(0, 1fr) auto; }
}
