/* PQ PDF Feedback Form Styles */
/* CSP-compliant: no inline styles */

/* ===== Theme Variables ===== */
:root {
    --fb-primary:       #ff8c00;
    --fb-primary-dark:  #cc7000;
    --fb-primary-light: #ffaa44;
    --fb-bg:            #040810;
    --fb-surface:       #0c1525;
    --fb-surface-light: #121e35;
    --fb-text:          #f0e6d3;
    --fb-text-dim:      #a89070;
    --fb-text-muted:    #5a4a38;
    --fb-border:        #1a2840;
    --fb-border-hover:  #2a3c58;
    --fb-error:         #ff1744;
    --fb-success:       #00e676;
    --fb-glow:          rgba(255, 140, 0, 0.2);
    --fb-shadow:        rgba(0, 0, 0, 0.5);
    --fb-bug:           #ff4d6d;
    --fb-feature:       #7b5ea7;
    --fb-tool:          #0096c7;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--fb-bg);
    color: var(--fb-text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Wrapper ===== */
.fb-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
    position: relative;
    z-index: 10;
    flex: 1;
}

/* ===== Header ===== */
.fb-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.fb-main-heading {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--fb-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 30px var(--fb-glow);
}

.fb-description {
    color: var(--fb-text-dim);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 0.6rem;
}

.fb-contact-note {
    font-size: 0.88rem;
    color: var(--fb-text-muted);
}

.fb-contact-link {
    color: var(--fb-primary);
    text-decoration: none;
}

.fb-contact-link:hover {
    text-decoration: underline;
}

/* ===== Form Card ===== */
.fb-form-card {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: 12px;
    padding: 2.2rem 2.4rem;
    box-shadow: 0 4px 40px var(--fb-shadow);
    position: relative;
    overflow: hidden;
}

.fb-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fb-primary), var(--fb-primary-light), var(--fb-primary));
}

/* ===== Type Cards ===== */
.fb-type-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.8rem;
}

.fb-type-legend {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    display: block;
    width: 100%;
}

.fb-type-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}

.fb-type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.2rem 0.8rem 1rem;
    background: var(--fb-surface-light);
    border: 2px solid var(--fb-border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    text-align: center;
    user-select: none;
}

.fb-type-card:hover {
    border-color: var(--fb-border-hover);
    background: #162030;
}

.fb-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.fb-type-icon {
    font-size: 1.8rem;
    line-height: 1;
    display: block;
}

.fb-type-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fb-text);
}

.fb-type-desc {
    font-size: 0.76rem;
    color: var(--fb-text-muted);
    line-height: 1.3;
}

/* Selected states */
.fb-type-card--selected[for="type-bug"],
.fb-type-card:has(#type-bug:checked) {
    border-color: var(--fb-bug);
    box-shadow: 0 0 20px rgba(255, 77, 109, 0.25);
    background: rgba(255, 77, 109, 0.06);
}

.fb-type-card--selected[for="type-feature"],
.fb-type-card:has(#type-feature:checked) {
    border-color: var(--fb-feature);
    box-shadow: 0 0 20px rgba(123, 94, 167, 0.25);
    background: rgba(123, 94, 167, 0.06);
}

.fb-type-card--selected[for="type-tool"],
.fb-type-card:has(#type-tool:checked) {
    border-color: var(--fb-tool);
    box-shadow: 0 0 20px rgba(0, 150, 199, 0.25);
    background: rgba(0, 150, 199, 0.06);
}

/* ===== Form Fields ===== */
.fb-form-group {
    margin-bottom: 1.5rem;
}

.fb-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--fb-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.fb-required {
    color: var(--fb-primary);
}

.fb-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--fb-text-muted);
    font-size: 0.82rem;
}

.fb-field-hint {
    font-size: 0.82rem;
    color: var(--fb-text-muted);
    margin-bottom: 0.5rem;
    min-height: 1.2em;
    transition: opacity 0.2s;
}

.fb-form-group input[type="text"],
.fb-form-group input[type="email"],
.fb-form-group textarea {
    width: 100%;
    background: var(--fb-surface-light);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--fb-text);
    font-size: 0.97rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    resize: vertical;
}

.fb-form-group input[type="text"]:focus,
.fb-form-group input[type="email"]:focus,
.fb-form-group textarea:focus {
    border-color: var(--fb-primary);
    box-shadow: 0 0 0 3px var(--fb-glow);
}

.fb-form-group input[type="text"]::placeholder,
.fb-form-group input[type="email"]::placeholder,
.fb-form-group textarea::placeholder {
    color: var(--fb-text-muted);
}

.fb-form-group textarea {
    min-height: 160px;
    line-height: 1.6;
}

/* datalist indicator */
.fb-form-group input[list] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a4a38' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.2rem;
}

/* ===== Hidden tool group ===== */
.fb-form-group.fb-hidden {
    display: none;
}

/* ===== Char count ===== */
.fb-char-count {
    font-size: 0.77rem;
    color: var(--fb-text-muted);
    text-align: right;
    margin-top: 0.3rem;
}

.fb-char-count.fb-char-near {
    color: var(--fb-primary);
}

.fb-char-count.fb-char-over {
    color: var(--fb-error);
}

/* ===== Validation messages ===== */
.fb-validation-msg {
    font-size: 0.82rem;
    min-height: 1.2em;
    margin-top: 0.3rem;
    color: var(--fb-error);
}

/* ===== Human verification ===== */
.fb-verification {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: var(--fb-surface-light);
    border: 1px solid var(--fb-border);
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: var(--fb-text-dim);
}

.fb-ver-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fb-text-muted);
    flex-shrink: 0;
    transition: background 0.3s;
}

.fb-ver-indicator.verifying {
    background: var(--fb-primary);
    animation: fb-pulse 1.2s infinite;
}

.fb-ver-indicator.verified {
    background: var(--fb-success);
}

@keyframes fb-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* ===== Submit button ===== */
.fb-submit-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, var(--fb-primary), var(--fb-primary-dark));
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s, transform 0.1s;
    margin-top: 0.4rem;
}

.fb-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.fb-submit-btn:not(:disabled):hover {
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.4);
    transform: translateY(-1px);
}

.fb-submit-btn:not(:disabled):active {
    transform: translateY(0);
}

/* ===== Success / Error messages ===== */
.fb-success-msg,
.fb-error-msg {
    display: none;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin-top: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.fb-success-msg {
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--fb-success);
}

.fb-error-msg {
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: var(--fb-error);
}

.fb-success-msg.visible,
.fb-error-msg.visible {
    display: block;
}

/* ===== Footer ===== */
.fb-footer {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.fb-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.fb-footer-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.fb-footer-logo-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fb-text-dim);
}

.fb-footer-copy {
    font-size: 0.82rem;
    color: var(--fb-text-muted);
}

.fb-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.83rem;
}

.fb-footer-link {
    color: var(--fb-text-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.fb-footer-link:hover {
    color: var(--fb-primary);
}

.fb-footer-sep {
    color: var(--fb-text-muted);
}

.fb-footer-tagline {
    font-size: 0.8rem;
    color: var(--fb-text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .fb-wrapper {
        padding: 2rem 1.2rem 3rem;
    }

    .fb-form-card {
        padding: 1.6rem 1.2rem;
    }

    .fb-type-cards {
        grid-template-columns: 1fr;
    }

    .fb-type-card {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
    }

    .fb-type-icon {
        font-size: 1.4rem;
        flex-shrink: 0;
    }
}
