/* App-specific layout for spendwise. Retheming lives in theme.css; this
 * file only styles what Bootstrap cannot express. */

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app main {
    flex: 1 0 auto;
}

.app-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    background: var(--danger);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    max-width: 32rem;
}

.brand-glyph {
    color: var(--accent);
}

.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.summary-card .card-body {
    padding: 0.9rem 1.1rem;
}

.summary-amount {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.bill-item-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.share-preview {
    font-size: 0.875rem;
}

.share-preview li {
    padding: 0.1rem 0;
}

.member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--panel-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    margin: 0 0.35rem 0.35rem 0;
    font-size: 0.9rem;
}

.member-chip .btn-close {
    font-size: 0.55rem;
}

.amount-input {
    max-width: 9rem;
}

.split-mode-select {
    max-width: 11rem;
}

.participant-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.participant-name {
    min-width: 8rem;
}

.participant-row .form-check {
    margin-bottom: 0;
}

.balance-transfer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.settle-sheet {
    border-top: 1px dashed var(--bs-border-color);
}

.hero {
    padding: 3rem 0 1rem;
}

.muted-small {
    color: var(--muted);
    font-size: 0.875rem;
}

/* The one-time token secret: monospace, selectable and wrapping. */
.token-secret {
    background: var(--panel-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    word-break: break-all;
    user-select: all;
}

/* Icon-only close buttons are easy to miss on a touch screen. */
.btn-close.touch-close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background-size: 0.75rem;
}

/* Below the desktop breakpoint the navbar collapses behind the toggler,
 * so the links can use comfortable, full-width tap targets. */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 0.25rem 0 0.5rem;
    }

    .navbar-toggler {
        min-height: 2.75rem;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0.625rem 0.5rem;
    }

    .navbar-collapse .navbar-text {
        padding-top: 0.5rem;
    }

    .btn {
        min-height: 2.75rem;
    }

    .form-control,
    .form-select {
        min-height: 2.75rem;
    }

    .btn-close.touch-close {
        width: 2.75rem;
        height: 2.75rem;
        background-size: 1rem;
    }
}

/* Narrow screens: let selects take the full row width instead of
 * truncating their labels. */
@media (max-width: 575.98px) {
    .split-mode-select {
        max-width: 100%;
    }
}

/* At the very smallest widths the split value label and input fit on one
 * row only if they are slightly narrower. */
@media (max-width: 359.98px) {
    .participant-name {
        min-width: 5.5rem;
    }

    .amount-input {
        max-width: 7rem;
    }
}
