/* ==========================================================================
   assets/kuota/kuota.css — Cek Kuota Axis XL page.
   Depends on /assets/ui.css for tokens and shared primitives.
   ========================================================================== */

body {
    padding: 2.5rem 1.25rem 5rem;
}

.kuota-container {
    max-width: 820px;
    margin: 0 auto;
}

/* Page heading icon: one em, aligned to the cap height. */
.page-title .icon {
    width: 1em;
    height: 1em;
    stroke-width: 1.8;
}

/* -------------------------------------------------------------------- form */

.check-form {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
}

.check-form .input-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

.check-form .btn-primary {
    flex: none;
    padding-inline: 1.1rem;
}

@media (max-width: 520px) {
    .check-form {
        flex-direction: column;
    }

    .check-form .btn-primary {
        width: 100%;
    }
}

.hint {
    margin-top: 0.65rem;
}

/* Blinking square while the request is in flight. */
.btn-primary.is-busy {
    cursor: progress;
}

.btn-primary.is-busy::before {
    content: "";
    flex: none;
    width: 8px;
    height: 8px;
    background: currentColor;
    animation: kuota-blink 0.9s steps(1, end) infinite;
}

@keyframes kuota-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0.15;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary.is-busy::before {
        animation: none;
    }
}

/* ------------------------------------------------------------ card details */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: var(--bd) solid var(--line);
}

/* Six fields: 2 columns on narrow screens, 3 when there is room. */
@media (min-width: 700px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.info-cell {
    padding: 0.8rem 0.9rem;
    background: var(--panel-2);
}

.info-cell .info-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.info-cell .info-label .icon {
    width: 13px;
    height: 13px;
    stroke-width: 2.6;
}

.info-cell .info-value {
    margin-top: 0.35rem;
    font-size: 0.92rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.info-cell .info-value.is-alert {
    color: var(--danger);
}

/* ---------------------------------------------------------------- packages */

.package-list {
    display: grid;
    gap: 1rem;
}

.package {
    background: var(--panel-2);
    border: var(--bd) solid var(--line);
}

.package-head {
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid var(--line);
}

.package-name {
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    overflow-wrap: anywhere;
}

.package-expiry {
    margin-top: 0.3rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.benefits {
    margin: 0;
    padding: 0;
    list-style: none;
}

.benefit {
    padding: 0.75rem 0.95rem;
    border-top: 1px solid var(--line);
}

.benefit:first-child {
    border-top: 0;
}

.benefit-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.9rem;
}

.benefit-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.benefit-name .icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.4;
    color: var(--muted);
}

.benefit-amount {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--ink);
    white-space: nowrap;
}

/* Square, hard-bordered quota meter. */
.meter {
    height: 10px;
    margin-top: 0.5rem;
    background: var(--well);
    border: var(--bd) solid var(--line);
}

.meter-fill {
    display: block;
    height: 100%;
    background: var(--ok);
    transition: width var(--speed) linear;
}

.meter-fill.is-warn {
    background: var(--accent);
}

.meter-fill.is-low {
    background: var(--danger);
}

/* -------------------------------------------------------------- empty state */

.empty {
    padding: 1.3rem 1rem;
    border: var(--bd) dashed var(--line-2);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.74rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
