/* =====================================================================
   horo-period-hub v3.2.4
   Option C — unified card with internal divisions.

   The card wraps the period tabs + sign dropdown + birthday checker
   into one bordered container. Internal sizing is tightened so the
   block reads as a single compact "tool" rather than three loose rows.

   The H1 is rendered by the theme template (entry-title) and is NOT
   touched by this module.
   ===================================================================== */

.hphub {
    margin: 0 0 24px;
}

/* ---- The card shell ------------------------------------------------- */
.hphub__card {
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 16, 61, .04);
    /* No overflow:hidden — the dropdown panel needs to escape the card
       to render below the trigger. The card-row borders give the
       internal divider look without needing clipping. */
}

.hphub__card-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
}
.hphub__card-row + .hphub__card-row {
    border-top: 1px solid #f4f4f6;
}

/* ---- Force tabs and dropdown to stay on one line on desktop.
       Period tabs get the flexible space (and scroll horizontally if
       they don't fit). Dropdown gets a reserved fixed width on the
       right side and never wraps. */
.hphub__card .hnav {
    margin: 0;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hphub__card .hnav__periods {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.hphub__card .hnav__periods::-webkit-scrollbar { display: none; }

/* ---- Dropdown — keep horo-nav's visual style but make it a fixed,
       non-shrinking column on the right side of the row. The panel
       still breaks out wider so the sign grid displays properly. */
.hphub__card .hnav__dd {
    flex: 0 0 auto;
    width: 200px;
    min-width: 200px;
    max-width: 240px;
}
.hphub__card .hnav__dd-trigger {
    padding: 9px 14px;
    gap: 8px;
}

/* Panel anchored to the right edge of the trigger, expands wider so
   the 2-column sign grid + dates fit without truncation. */
.hphub__card .hnav__dd-panel {
    left: auto;
    right: 0;
    min-width: 380px;
    max-width: 460px;
}

/* ---- Birthday row -------------------------------------------------- */
.hphub__bday {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.hphub__bday-label {
    font-size: 13px;
    color: #5b5d68;
    flex-shrink: 0;
    line-height: 1.3;
}

.hphub__bday-input {
    flex: 1 1 130px;
    max-width: 160px;
    padding: 7px 12px;
    border: 1.5px solid #e4e4ea;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.hphub__bday-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, .06);
}
.hphub__bday-input::placeholder {
    color: #b0b0b8;
    letter-spacing: 0.5px;
    font-size: 12.5px;
}

.hphub__bday-btn {
    padding: 7px 16px;
    border: 1.5px solid #1a1a1a;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color .15s ease, transform .12s ease;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
}
.hphub__bday-btn:hover {
    background: #2c2d2e;
    border-color: #2c2d2e;
}
.hphub__bday-btn:active {
    transform: translateY(1px);
}

/* ---- Result pill (inline next to button) --------------------------- */
.hphub__bday-result {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f1f4;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background-color .15s ease, transform .12s ease;
    flex-shrink: 0;
    line-height: 1.3;
}
.hphub__bday-result::after {
    content: " →";
    color: #8a8a92;
    font-weight: 400;
}
.hphub__bday-result:hover {
    background: #e6e6ea;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.hphub__bday-error {
    font-size: 12.5px;
    color: #991b1b;
    padding: 4px 10px;
    background: #fee2e2;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ---- "Все знаки" sits at the right of the tabs row ----------------- */
.hphub__card-row--top {
    justify-content: space-between;
}

/* ---- Mobile -------------------------------------------------------- */
@media (max-width: 660px) {
    .hphub__card-row {
        padding: 11px 14px;
        gap: 10px;
    }
    .hphub__card .hnav { flex-wrap: wrap; }
    .hphub__card .hnav__periods {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .hphub__card .hnav__periods::-webkit-scrollbar { display: none; }
    .hphub__card .hnav__dd {
        flex: 1 1 100%;
        max-width: none;
        min-width: 0;
    }
    .hphub__card .hnav__dd-panel {
        left: 0;
        right: 0;
        min-width: 0;
        max-width: none;
    }
    .hphub__bday-label {
        width: 100%;
        margin-bottom: 2px;
    }
    .hphub__bday-input {
        flex: 1 1 130px;
        max-width: none;
    }
    .hphub__bday-result {
        margin-top: 4px;
    }
}
