/**
 * AdBlue Lead Form - Frontend Styles
 * Mobile-first, light form for dark blue background
 */

/* Reset & Base */
.adblue-form-wrapper { width: 100%; max-width: 680px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.adblue-form-wrapper * { box-sizing: border-box; }

.adblue-form {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
    .adblue-form { padding: 32px; }
}

/* Honeypot - hidden */
.adblue-hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Steps */
.adblue-step { display: none; }
.adblue-step.active { display: block; }

/* Fields */
.adblue-field { margin-bottom: 20px; }
.adblue-field:last-child { margin-bottom: 0; }

.adblue-field label,
.adblue-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    color: #1a1a1a;
}

.adblue-field .required { color: #e53935; margin-left: 2px; }

/* Inputs & Selects */
.adblue-field input[type="text"],
.adblue-field input[type="tel"],
.adblue-field input[type="email"],
.adblue-field select,
.adblue-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #bfe8ff;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.adblue-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%231a1a1a' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
    cursor: pointer;
}

.adblue-field textarea { min-height: 100px; resize: vertical; line-height: 1.5; }

.adblue-field input:focus,
.adblue-field select:focus,
.adblue-field textarea:focus {
    outline: none;
    border-color: #1ea7ff;
    box-shadow: 0 0 0 3px rgba(30, 167, 255, 0.15);
}

.adblue-field input.error,
.adblue-field select.error,
.adblue-field textarea.error { border-color: #e53935; }

.adblue-field input::placeholder,
.adblue-field textarea::placeholder { color: #9e9e9e; }

/* Radio Group */
.adblue-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (min-width: 480px) {
    .adblue-radio-group { grid-template-columns: repeat(4, 1fr); }
}

.adblue-radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border: 2px solid #bfe8ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
}

.adblue-radio-label:hover { border-color: #1ea7ff; background: #f0f9ff; }

.adblue-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.adblue-radio-label.selected {
    border-color: #1ea7ff;
    background: #e3f4ff;
    color: #0c8de0;
}

/* Checkbox */
.adblue-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #1a1a1a;
}

.adblue-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    border: 2px solid #bfe8ff;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #1ea7ff;
}

/* Urgent Box */
.urgent-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffb74d;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    animation: urgentPulse 0.4s ease;
}

.urgent-box p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #e65100;
    line-height: 1.5;
}

@keyframes urgentPulse {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Buttons */
.adblue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.adblue-btn-next,
.adblue-btn-submit {
    background: #1ea7ff;
    color: #fff;
}

.adblue-btn-next:hover,
.adblue-btn-submit:hover { background: #0c8de0; }

.adblue-btn-back {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #bfe8ff;
}

.adblue-btn-back:hover { border-color: #1ea7ff; background: #f0f9ff; }

.adblue-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Two buttons layout */
.adblue-field-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

/* Submit loading state */
.adblue-btn-submit.loading { position: relative; color: transparent; pointer-events: none; }
.adblue-btn-submit.loading .adblue-btn-text { opacity: 0; }
.adblue-btn-loader { display: none; }
.adblue-btn-submit.loading .adblue-btn-loader {
    display: block;
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adblue-spin 0.7s linear infinite;
}

@keyframes adblue-spin { to { transform: rotate(360deg); } }

/* Error Messages */
.adblue-error-message {
    display: none;
    color: #e53935;
    font-size: 13px;
    margin-top: 6px;
}

.adblue-error-message.show { display: block; }

/* Form Message */
.adblue-form-message {
    display: none;
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 15px;
    text-align: center;
    font-weight: 500;
}

.adblue-form-message.success {
    display: block;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.adblue-form-message.error {
    display: block;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}
