/**
 * Custom Contact Form Styles
 * Adapted from the original Gravity Form #gform_6 styling.
 * Path: /functionality/css/form-submission.css
 *
 * NOTE: `!important` and `body #custom-contact-form` prefix are used on purpose
 * to override Divi/theme rules like:
 *   input[type=email], select, textarea { border: 1px solid #bbb; ... }
 */

/* =========================================
 * Form container
 * ========================================= */
body #custom-contact-form {
    background-color: rgba(64, 64, 64, 0.9);
    padding: 50px 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0;
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif;
}

/* Override global Divi p padding for form rows */
body #custom-contact-form p {
    margin: 0 0 16px;
    padding-bottom: 0 !important;
}

/* =========================================
 * Labels — always on their own line
 * ========================================= */
body #custom-contact-form p > label,
body #custom-contact-form label {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    color: #FFD45C !important;
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin: 0 0 4px 0;
    padding: 0 !important;
}

/* =========================================
 * Inputs, selects, textareas — own line + required look
 * ========================================= */
body #custom-contact-form p > input,
body #custom-contact-form p > select,
body #custom-contact-form p > textarea,
body #custom-contact-form input[type="text"],
body #custom-contact-form input[type="email"],
body #custom-contact-form input[type="tel"],
body #custom-contact-form input[type="number"],
body #custom-contact-form select,
body #custom-contact-form textarea {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(140, 140, 140, 0.25) !important;
    border: none !important;
    border-radius: 0 !important;
    color: #ffd45c !important;
    padding: 15px !important;
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    margin: 0 !important;
}

body #custom-contact-form input:focus,
body #custom-contact-form select:focus,
body #custom-contact-form textarea:focus {
    outline: 1px solid #FFD45C !important;
    outline-offset: 1px;
}

body #custom-contact-form input::placeholder,
body #custom-contact-form textarea::placeholder {
    color: #FFD45C !important;
    opacity: 0.8;
}

/* Remove number input spinners */
body #custom-contact-form input[type="number"]::-webkit-outer-spin-button,
body #custom-contact-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
body #custom-contact-form input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Custom select arrow (must come AFTER the padding shorthand) */
body #custom-contact-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23FFD45C' d='M1.41 0L6 4.59 10.59 0 12 1.41 6 7.41 0 1.41z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px 8px !important;
    padding-right: 40px !important;
}

body #custom-contact-form select option {
    color: #000000;
    background: #ffffff;
}

/* =========================================
 * Submit button
 * ========================================= */
body #custom-contact-form #submit-btn {
    background-color: #FFD45C !important;
    color: #000000 !important;
    border: 1px solid #FFD45C !important;
    border-radius: 0 !important;
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 18px !important;
    font-weight: 700;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    padding: 12px 30px !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

body #custom-contact-form #submit-btn:hover {
    background-color: transparent !important;
    color: #FFD45C !important;
    border-color: #FFD45C !important;
}

body #custom-contact-form #submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* =========================================
 * Global message area (success / error)
 * ========================================= */
body #custom-contact-form #form-message {
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    padding: 12px 16px;
    border-left: 4px solid transparent;
    border-radius: 0;
}

/* Success: light green text on translucent green background */
body #custom-contact-form #form-message.is-success {
    background: rgba(40, 167, 69, 0.15);
    border-left-color: #28a745;
    color: #90ee90 !important;
}

/* Error: light red text on translucent red background */
body #custom-contact-form #form-message.is-error {
    background: rgba(220, 53, 69, 0.15);
    border-left-color: #dc3545;
    color: #ffb3b3 !important;
}

/* =========================================
 * Field-level error state
 * ========================================= */
body #custom-contact-form p.has-error input,
body #custom-contact-form p.has-error select,
body #custom-contact-form p.has-error textarea {
    box-shadow: 0 0 0 2px #ff6b6b !important;
}

body #custom-contact-form .field-error {
    display: block;
    color: #ff6b6b !important;
    font-family: 'Trajan Pro 3', Helvetica, Arial, Lucida, sans-serif;
    font-size: 12px !important;
    line-height: 1.3;
    padding: 4px 0 0 0 !important;
    margin: 0 !important;
}

/* =========================================
 * Honeypot field (defensive)
 * ========================================= */
body #custom-contact-form .form-honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =========================================
 * Responsive
 * ========================================= */
@media (max-width: 767px) {
    body #custom-contact-form {
        padding: 30px 20px;
    }

    body #custom-contact-form p > label,
    body #custom-contact-form label {
        font-size: 13px;
    }

    body #custom-contact-form #submit-btn {
        width: 100%;
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
}