/**
 * [BLOCK STYLE: CONTACT FORM]
 * LOCATION: logic/blocks/contactformblock/style.css
 */

.block-contact {
    background-color: var(--c-navy-900, #0b1124); 
    padding: 5rem 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.block-contact__container {
    max-width: 800px;
    margin: 0 auto;
}

/* --- HEADER --- */
.block-contact__header {
    text-align: center;
    margin-bottom: 3rem;
}

.block-contact__title {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.text-white { color: #fff; }
.text-gold { color: var(--c-accent, #c5a059); margin: 0 0.2em; }

/* --- FORM LAYOUT --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form__row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .contact-form__row {
        flex-direction: row;
    }
    .form-group {
        flex: 1;
    }
}

/* --- INPUT STYLES --- */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Very subtle fill */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 1rem;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    outline: none;
    border-color: var(--c-accent, #c5a059);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.2); /* Gold Glow */
}

.form-select {
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
    
    /* THE FIX: Forces the browser's native popup to use Dark Mode colors */
    color-scheme: dark; 
}

/* DIRECT STYLING (For Windows/Linux Browsers) */
/* Note: macOS/iOS often ignores this and relies on 'color-scheme' above */
.form-select option {
    background-color: var(--c-navy-900, #0b1124); /* Deep Navy */
    color: #fff;
    padding: 10px;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- BUTTON --- */
.contact-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #c5a059 0%, #a67c38 100%);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(197, 160, 89, 0.5);
    filter: brightness(1.1);
}

/* =========================================
   ANIMATIONS (Reveal Logic)
   ========================================= */

/* 1. INITIAL STATE */
.block-contact.reveal-group .block-contact__title,
.block-contact.reveal-group .form-group,
.block-contact.reveal-group .contact-btn {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 2. ACTIVE STATE */
.block-contact.reveal-active .block-contact__title,
.block-contact.reveal-active .form-group,
.block-contact.reveal-active .contact-btn {
    opacity: 1;
    transform: translateY(0);
}

/* 3. STAGGER */
.block-contact.reveal-active .block-contact__title { transition-delay: 0.1s; }
.block-contact.reveal-active .form-group:nth-of-type(1) { transition-delay: 0.2s; }
.block-contact.reveal-active .form-group:nth-of-type(2) { transition-delay: 0.3s; }
.block-contact.reveal-active .form-textarea { transition-delay: 0.4s; }
.block-contact.reveal-active .contact-btn { transition-delay: 0.5s; }

/* =========================================
   INTERACTIVE STATES (AJAX)
   ========================================= */

/* SUCCESS BUTTON (Green) */
.contact-btn.btn-success {
    background: #10b981 !important; /* Emerald Green */
    color: #fff !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    transform: scale(1.02);
    cursor: default;
}
/* =========================================
   BROWSER AUTOFILL FIX
   Forces auto-filled inputs to stay dark.
   ========================================= */

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    /* 1. The Mask: We use a massive inner shadow to cover the browser's white background */
    /* We use a solid dark navy color (#131b2e) that matches your form input look */
    -webkit-box-shadow: 0 0 0 30px #131b2e inset !important;
    
    /* 2. The Text: Force the text color back to white */
    -webkit-text-fill-color: #ffffff !important;
    
    /* 3. Maintain the rounded corners */
    transition: background-color 5000s ease-in-out 0s;
}
/* --- CUSTOM SELECT DROPDOWN --- */
select.form-input {
    /* 1. Remove default browser gloss/arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* 2. Match text inputs */
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    
    /* 3. Add Custom Gold Arrow (SVG encoded) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5a059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem; /* Make room for the arrow */
}

/* Hover State */
select.form-input:hover {
    border-color: rgba(197, 160, 89, 0.5); /* Gold tint */
    background-color: rgba(255, 255, 255, 0.08);
}

/* Focus State */
select.form-input:focus {
    outline: none;
    border-color: var(--c-accent, #c5a059);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* --- DROPDOWN OPTIONS (The list itself) --- */
/* Note: Styling options is limited by browsers, but this sets the dark base */
select.form-input option {
    background-color: #1a202c; /* Dark Navy background */
    color: #fff; /* White Text */
    padding: 10px;
}

/* Placeholder styling (first disabled option) */
select.form-input option[disabled] {
    color: #64748b; /* Muted grey */
}
.form-layout-split {
    display: flex;
    flex-direction: column; /* Mobile: Stacked */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .form-layout-split {
        flex-direction: row; /* Desktop: Side by Side */
        align-items: stretch;
    }

    .form-column-left {
        flex: 1; /* Takes 50% */
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-column-right {
        flex: 1; /* Takes 50% */
    }
}

/* --- FORM INPUTS --- */
.form-group {
    position: relative;
    margin-bottom: 0; /* Handled by parent gap */
}

/* Make Textarea fill the height of the right column */
.form-group--tall {
    height: 100%;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-textarea {
    height: 150px; /* Mobile height */
    resize: none;
}

@media (min-width: 768px) {
    .form-textarea {
        height: 100%; /* Desktop: Fills the column height to match inputs */
        min-height: 200px;
    }
}

.form-input:focus {
    outline: none;
    border-color: var(--c-accent, #c5a059);
    background: rgba(255, 255, 255, 0.08);
}