/* Legion Tools — forms and members hub. Uses the American Legion theme's
   colors and fonts when present, with fallbacks for other themes. */

.lt-form,
.lt-hub {
    --lt-blue: var(--color-blue, #002664);
    --lt-blue-dark: var(--color-blue-dark, #001a47);
    --lt-gold: var(--color-gold, #c5a04a);
    --lt-red: var(--color-red, #bf0d3e);
    --lt-gray: var(--color-gray-600, #6c757d);
    --lt-line: var(--color-gray-200, #e9ecef);
    --lt-soft: var(--color-gray-100, #f8f9fa);
    max-width: 820px;
    margin: 0 auto;
}

.lt-card {
    background: #fff;
    border: 1px solid var(--lt-line, #e9ecef);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    margin: 0 0 20px;
}

/* ---- Forms ---- */
.lt-form fieldset {
    min-width: 0;
}

.lt-form legend {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0 0 16px;
    font-family: var(--font-heading, inherit);
    font-size: 1.375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--lt-blue);
    border-bottom: 2px solid var(--lt-gold);
    padding-bottom: 8px;
}

.lt-form legend + * {
    clear: both;
}

.lt-field {
    margin-bottom: 16px;
}

.lt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.lt-form label,
.lt-label {
    display: block;
    font-weight: 700;
    color: var(--lt-blue);
    margin-bottom: 6px;
    font-size: 0.9375rem;
}

.lt-req {
    color: var(--lt-red);
}

.lt-form input[type="text"],
.lt-form input[type="email"],
.lt-form input[type="tel"],
.lt-form input[type="date"],
.lt-form input[type="time"],
.lt-form select,
.lt-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid #cdd3e0;
    border-radius: 6px;
    font: inherit;
    font-size: 1rem;
    color: #212529;
    background: #fff;
    box-sizing: border-box;
}

.lt-form input:focus,
.lt-form select:focus,
.lt-form textarea:focus {
    border-color: var(--lt-blue);
    outline: 3px solid rgba(197, 160, 74, 0.45);
    outline-offset: 0;
}

.lt-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
}

.lt-choices--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.lt-form .lt-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #212529;
    margin: 0;
    padding: 9px 12px;
    border: 1.5px solid #dce2f0;
    border-radius: 8px;
    cursor: pointer;
}

.lt-form .lt-choice:has(input:checked) {
    border-color: var(--lt-blue);
    background: rgba(0, 38, 100, 0.05);
}

.lt-choice input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--lt-blue);
}

.lt-help {
    font-size: 0.875rem;
    color: var(--lt-gray);
    margin: 6px 0 0;
}

.lt-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lt-callout {
    background: rgba(191, 13, 62, 0.07);
    border: 1px solid rgba(191, 13, 62, 0.35);
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
}

.lt-callout[hidden] {
    display: none;
}

.lt-alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.lt-alert--error {
    background: #fdecea;
    color: #8c1d18;
    border: 1px solid #ef9a9a;
}

.lt-success {
    border-top: 4px solid #2e7d32;
}

.lt-success h3 {
    margin-top: 0;
    color: #1e5631;
}

.lt-privacy {
    font-size: 0.875rem;
    color: var(--lt-gray);
}

.lt-form .wp-block-button__link {
    border: 0;
    cursor: pointer;
    font-size: 1rem;
    padding: 14px 34px;
}

/* ---- Members hub ---- */
.lt-hub h2 {
    margin: 0;
}

.lt-hub__welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--lt-blue) 0%, var(--lt-blue-dark) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 28px;
}

.lt-hub__welcome h2 {
    color: #fff;
    font-size: 2rem;
}

.lt-hub__eyebrow {
    margin: 0 0 4px;
    color: var(--lt-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8125rem;
}

.lt-hub__stats {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lt-hub__stats li {
    display: flex;
    flex-direction: column;
    min-width: 80px;
}

.lt-hub__stats strong {
    font-family: var(--font-heading, inherit);
    font-size: 2rem;
    line-height: 1;
    color: var(--lt-gold);
}

.lt-hub__stats span {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
}

.lt-hub__stats em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.65);
}

.lt-hub__since {
    font-size: 0.8125rem;
    color: var(--lt-gray);
    text-align: right;
    margin: 6px 0 20px;
}

.lt-hub__officer {
    border-left: 4px solid var(--lt-gold);
}

.lt-hub__officer h3 {
    margin: 0 0 10px;
    font-size: 1.125rem;
}

.lt-hub__officer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lt-hub__officer li + li {
    border-top: 1px solid var(--lt-line);
}

.lt-hub__officer li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    font-weight: 600;
}

.lt-hub__officer p {
    margin: 0;
    color: var(--lt-gray);
}

.lt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--lt-red);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
}

.lt-hub__tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.lt-tool {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--lt-line);
    border-top: 4px solid var(--lt-gold);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lt-tool:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    color: inherit;
}

.lt-tool__icon.dashicons {
    width: 44px;
    height: 44px;
    font-size: 26px;
    line-height: 44px;
    text-align: center;
    border-radius: 50%;
    background: rgba(197, 160, 74, 0.16);
    color: var(--lt-blue);
}

.lt-tool__title {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--lt-blue);
}

.lt-tool__desc {
    font-size: 0.9375rem;
    color: var(--lt-gray);
}

.lt-hub__account {
    text-align: center;
    font-size: 0.9375rem;
}

.lt-hub--guest {
    text-align: center;
    padding: 36px;
}

.lt-hub__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .lt-row {
        grid-template-columns: 1fr;
    }

    .lt-card {
        padding: 18px;
    }

    .lt-hub__welcome h2 {
        font-size: 1.5rem;
    }
}
