/* ── TFTW Brochure Builder UI Styles ── */

/* Button */
.tftw-bb-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    letter-spacing: .3px;
}
.tftw-bb-trigger:hover { opacity: .88; transform: translateY(-1px); }
.tftw-bb-trigger svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Overlay */
.tftw-bb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

/* Modal */
.tftw-bb-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    padding: 36px 36px 32px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0,0,0,.3);
    animation: tftwFadeUp .22s ease;
}
@keyframes tftwFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tftw-bb-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px;
}
.tftw-bb-close:hover { color: #333; }

/* Modal header */
.tftw-bb-modal-header { text-align: center; margin-bottom: 24px; }
.tftw-bb-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    background: #1a3c6b;
    border-radius: 50%;
    font-size: 26px;
    margin-bottom: 12px;
    color: #fff;
}
.tftw-bb-modal-header h2 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 700;
    color: #1a1a2e;
}
.tftw-bb-modal-header p {
    margin: 0;
    font-size: 13.5px;
    color: #666;
}

/* Form */
.tftw-bb-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 480px) {
    .tftw-bb-field-group { grid-template-columns: 1fr; }
    .tftw-bb-modal { padding: 24px 20px; }
}
.tftw-bb-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.tftw-bb-field:last-of-type { margin-bottom: 6px; }
.tftw-bb-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.tftw-bb-field label span { color: #c8102e; }
.tftw-bb-field .tftw-optional { color: #999; font-weight: 400; text-transform: none; letter-spacing: 0; }
.tftw-bb-field input {
    padding: 10px 13px;
    border: 1.5px solid #dde;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .18s;
    outline: none;
    color: #222;
    width: 100%;
    box-sizing: border-box;
}
.tftw-bb-field input:focus { border-color: #1a3c6b; }
.tftw-bb-field input.tftw-invalid { border-color: #c8102e; }

/* Generate button */
.tftw-bb-generate {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    background: #1a3c6b;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .3px;
    transition: background .2s;
}
.tftw-bb-generate:hover { background: #142d52; }
.tftw-bb-generate:disabled { background: #999; cursor: not-allowed; }

/* Loading spinner */
.tftw-bb-loading {
    text-align: center;
    padding: 32px 0 24px;
}
.tftw-bb-spinner {
    width: 40px; height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a3c6b;
    border-radius: 50%;
    animation: tftwSpin .7s linear infinite;
    margin: 0 auto 14px;
}
@keyframes tftwSpin { to { transform: rotate(360deg); } }

/* Error */
.tftw-bb-error {
    padding: 14px 16px;
    background: #fff0f0;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #b00;
    font-size: 14px;
    margin-bottom: 16px;
}
