/* Steen Family Gift Swap: site styles. Mobile-first; layer wider screens with min-width queries.
   Placeholder only: M9 does the real look and feel. */

:root {
    --giftswap-red: #a4161a;
    --giftswap-green: #1b4332;
}

.site-header {
    background-color: var(--giftswap-green);
    margin-bottom: 1.5rem;
}

.site-header .navbar {
    padding: 0.5rem 0;
}

.site-header .site-name {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
}

.site-header .site-session {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.site-header .site-person {
    color: #fff;
}

h1 {
    color: var(--giftswap-red);
    font-size: 1.75rem;
}

.login-form,
.login-picker {
    max-width: 28rem;
}

/* Admin screens. */

.admin-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.admin-form {
    max-width: 40rem;
}

/* People: a stacked card per person on a phone, a table-like row from 768px. */
.people-row {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.people-row > div {
    margin-bottom: 0.25rem;
    overflow-wrap: anywhere;
}

.people-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.household-item {
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0;
}

/* Readiness: five columns that fit a 360px screen; roomier from 640px. */
.readiness-table > :not(caption) > * > * {
    padding: 0.25rem 0.15rem;
}

.ready-missing {
    color: var(--giftswap-red);
    font-weight: 600;
}

.household-form {
    display: flex;
    gap: 0.5rem;
    max-width: 28rem;
}

/* A person's own pages. */

.profile-form {
    max-width: 40rem;
}

/* Gift lists: no padding wasted on a phone, a rule between ideas, actions a thumb can find. */
.gift-section {
    margin-bottom: 2rem;
}

.gift-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    border-top: 1px solid #dee2e6;
}

.gift-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.gift-body {
    flex: 1 1 12rem;
    min-width: 0;
}

.gift-text {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.gift-note {
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: #6c757d;
}

.gift-link {
    overflow-wrap: anywhere;
}

.gift-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gift-actions .btn {
    min-width: 2.5rem;
}

.gift-form {
    max-width: 40rem;
}

.gift-remove {
    margin-top: 2rem;
}

/* The family: each person one tappable block, the address on the lines it was typed on. */
.family-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: inherit;
    text-decoration: none;
}

.family-row:hover,
.family-row:focus {
    background-color: #f8f9fa;
}

.family-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.family-missing {
    color: var(--giftswap-red);
}

.member-section {
    margin-bottom: 1.5rem;
}

.member-email {
    overflow-wrap: anywhere;
}

.mailing-address {
    white-space: pre-line;
    font-style: normal;
    overflow-wrap: anywhere;
}

/* The home page's to-do list. */
.todo-list {
    list-style: none;
    padding: 0;
    max-width: 40rem;
}

.todo-list > li {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.todo-missing {
    border-left: 4px solid var(--giftswap-red);
}

.todo-done {
    border-left: 4px solid var(--giftswap-green);
}

@media (min-width: 640px) {
    .readiness-table > :not(caption) > * > * {
        padding: 0.25rem 0.5rem;
    }

    .site-header .site-name {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .site-header .site-session {
        padding: 0;
    }

    .people-row {
        display: flex;
        align-items: center;
        gap: 1rem;
        border-width: 0 0 1px 0;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0.5rem 0;
    }

    .people-row > div {
        margin-bottom: 0;
    }

    .people-header {
        font-weight: 600;
        border-bottom-width: 2px;
    }

    .people-name {
        flex: 0 0 22%;
    }

    .people-household {
        flex: 0 0 15%;
    }

    .people-email {
        flex: 1 1 auto;
    }

    .people-login {
        flex: 0 0 11%;
    }

    .people-actions {
        flex: 0 0 auto;
        margin-top: 0;
        justify-content: flex-end;
    }
}
