/* ── Contact overlay ──────────────────────────────────────────────────────── */
.footer-contact-btn {
    background: none;
    border: none;
    color: #52978a;
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-contact-btn:hover {
    color: #5ac7b3;
}

.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-overlay[hidden] {
    display: none;
}

.contact-modal {
    background: #12122a;
    border: 1px solid rgba(100, 172, 255, 0.15);
    border-radius: 8px;
    padding: 36px 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.contact-title {
    margin: 0 0 24px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e0e8ff;
    letter-spacing: 0.03em;
}

.contact-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
}

.contact-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Honeypot — off-screen, not display:none (some bots detect that) */
.contact-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-field {
    margin-bottom: 18px;
}

.contact-field label {
    display: block;
    font-size: 0.82rem;
    color: rgba(200, 215, 255, 0.7);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.contact-optional {
    font-size: 0.75rem;
    color: rgba(200, 215, 255, 0.4);
}

.contact-required {
    color: #ff6b81;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(100, 172, 255, 0.2);
    border-radius: 5px;
    color: #e0e8ff;
    font-size: 0.92rem;
    padding: 10px 12px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: vertical;
    caret-color:  #1e88e5;
}

.contact-field input:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: rgba(100, 172, 255, 0.55);
}

.contact-textarea-wrap {
    position: relative;
}
.contact-field textarea::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.05);
}
.contact-field textarea::-webkit-resizer {
    background-color: transparent;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0,
        transparent 3px,
        rgba(100, 172, 255, 0.35) 3px,
        rgba(100, 172, 255, 0.35) 4px
    );
    background-size: 65% 65%;
    background-position: bottom right;
    background-repeat: no-repeat;
}
.contact-textarea-wrap textarea {
    padding-bottom: 22px;
}
.contact-char-counter {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.72rem;
    color: rgba(200, 215, 255, 0.35);
    pointer-events: none;
    font-family: inherit;
}
.contact-char-near-limit { color: rgba(255, 200, 100, 0.7); }
.contact-char-at-limit   { color: rgba(255, 107, 129, 0.85); }

.contact-error-msg {
    font-size: 0.85rem;
    color: #ff6b81;
    margin-bottom: 14px;
    padding: 8px 12px;
    background: rgba(255, 107, 129, 0.08);
    border-radius: 4px;
    border-left: 3px solid #ff6b81;
}

.contact-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.contact-submit {
    background: linear-gradient(135deg, #3949ab, #1e88e5);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.contact-submit:hover:not(:disabled) {
    opacity: 0.88;
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: default;
}

.contact-mailto {
    font-size: 0.8rem;
    color: rgba(200, 215, 255, 0.45);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.contact-mailto:hover {
    color: rgba(200, 215, 255, 0.8);
}

/* Success screen */
.contact-success {
    text-align: center;
    padding: 16px 0 8px;
    color: #a5d6a7;
}

.contact-success p {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-close-success {
    background: none;
    border: 1px solid rgba(165, 214, 167, 0.4);
    border-radius: 5px;
    color: #a5d6a7;
    padding: 8px 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-close-success:hover {
    background: rgba(165, 214, 167, 0.08);
}

@media (max-width: 540px) {
    .contact-modal {
        padding: 28px 22px;
    }

    .contact-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}
