/* ===================================================
   RADIMAGEN — Formularios V7 (Pill buttons, elegant)
   Botones cyan #00acd8, hover navy #003A70
   =================================================== */

/* ===== Form Row (2 columns on desktop) ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 0 16px;
    }
}

/* ===== Form Field (Labels Above) ===== */
.form-field {
    position: relative;
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #003A70;
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.3;
}

.form-required {
    color: #d93025;
    font-weight: 700;
}

.form-optional {
    color: #9aa0a6;
    font-weight: 400;
    font-size: 12px;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    background: white;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: #003A70;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: #9aa0a6;
    font-size: 14px;
}

/* Focus: box-shadow only (NO border-width change = no padding jump) */
.form-input:focus {
    border-color: #00acd8;
    box-shadow: 0 0 0 4px rgba(0, 172, 216, 0.12);
}

/* Textarea */
.form-textarea {
    height: auto;
    min-height: 80px;
    padding: 12px 16px;
    resize: vertical;
}

/* Select */
.form-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Inline validation checkmark — flexbox positioning (no hardcoded top) */
.form-field-check {
    position: absolute;
    right: 14px;
    bottom: 32px; /* sits above error-message */
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    pointer-events: none;
}

/* Position check inside input area */
.form-field:not(:has(.form-textarea)):not(:has(.form-select)):not(:has(.file-upload-area)) .form-field-check {
    top: 50%;
    bottom: auto;
    transform: scale(0.5) translateY(-50%);
}

.form-field.is-valid .form-field-check {
    opacity: 1;
    transform: scale(1);
}

.form-field.is-valid:not(:has(.form-textarea)):not(:has(.form-select)):not(:has(.file-upload-area)) .form-field-check {
    transform: scale(1) translateY(-50%);
}

/* Error State */
.form-field.has-error .form-input {
    border-color: #d93025;
}

.form-field.has-error .form-input:focus {
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1);
}

.error-message {
    color: #d93025;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-family: 'Montserrat', sans-serif;
}

/* ===== File Upload Area ===== */
.file-upload-area {
    position: relative;
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #00acd8;
    background: rgba(0, 172, 216, 0.03);
}

.file-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.file-upload-text {
    font-size: 14px;
    color: #5f6368;
    font-family: 'Montserrat', sans-serif;
}

.file-upload-text strong {
    color: #00acd8;
}

.file-upload-hint {
    font-size: 12px;
    color: #9aa0a6;
    font-family: 'Montserrat', sans-serif;
}

.file-upload-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.file-upload-name {
    font-size: 14px;
    font-weight: 500;
    color: #003A70;
    font-family: 'Montserrat', sans-serif;
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.file-upload-remove:hover {
    background: rgba(217, 48, 37, 0.1);
}

/* ===== CTA Button (Brand Cyan) ===== */
.btn-cta {
    width: 100%;
    padding: 16px 32px;
    background-color: #00acd8;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 172, 216, 0.2);
    margin-top: 4px;
}

.btn-cta:hover {
    background-color: #003A70;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 58, 112, 0.25);
}

.btn-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 172, 216, 0.3);
}

.btn-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Shimmer effect on hover */
.btn-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.btn-cta:hover::after {
    transform: translateX(100%);
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
}

/* ===== .btn-primary (Brand Cyan) ===== */
.btn-primary {
    background-color: #00acd8;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 32px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 172, 216, 0.2);
}

.btn-primary:hover {
    background-color: #003A70;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 58, 112, 0.25);
    color: #ffffff;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Small variant for header */
.btn-primary--small {
    padding: 10px 24px;
    font-size: 13px;
    border-radius: 100px;
}

.btn-secondary {
    background-color: #3f3a60;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 32px;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: #003A70;
}

.btn-tertiary {
    background-color: transparent;
    color: #00acd8;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 32px;
    border: 2px solid #00acd8;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-tertiary:hover {
    background-color: #00acd8;
    color: #ffffff;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #003A70;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-icon:hover {
    background-color: rgba(0, 58, 112, 0.08);
}

/* ===== Form Microcopy ===== */
.form-microcopy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 0;
}

.form-microcopy-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9aa0a6;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 24px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.toast--visible {
    transform: translateX(0);
}

.toast--success {
    background-color: #0d9488;
}

.toast--error {
    background-color: #d93025;
}

.toast--info {
    background-color: #003A70;
}

/* ===== Dark Theme Form (CTA Final) ===== */
.contact-form--dark .form-label {
    color: rgba(255, 255, 255, 0.9);
}

.contact-form--dark .form-required {
    color: #ff8a80;
}

.contact-form--dark .form-input {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-form--dark .form-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 172, 216, 0.2);
}

.contact-form--dark .form-microcopy-item {
    color: rgba(255, 255, 255, 0.6);
}

/* Glass card overrides */
.form-card-glass .form-input {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.35);
}

.form-card-glass .form-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
    .form-card-glass .form-input {
        background: white;
        border-color: #dadce0;
    }
    .form-card-glass .form-label {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Checkbox Label */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #003A70;
    font-family: 'Montserrat', sans-serif;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00acd8;
}

/* Form Hint */
.form-hint {
    display: block;
    font-size: 12px;
    color: #5f6368;
    margin-top: 4px;
    font-family: 'Montserrat', sans-serif;
}

/* Button ripple effect */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}
