/**
 * ROME Contacto - Estilos del formulario
 * Versión: 1.0.0
 */

/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */
.rome-contacto-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px;
    background: linear-gradient(135deg, #1a1f27 0%, #12151A 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* =====================================================
   HEADER
   ===================================================== */
.rome-contacto-header {
    text-align: center;
    margin-bottom: 35px;
}

.rome-contacto-titulo {
    color: #F5F5F5;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.rome-contacto-subtitulo {
    color: #A0A0A0;
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

/* =====================================================
   FORMULARIO
   ===================================================== */
.rome-contacto-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rome-form-row {
    display: flex;
    gap: 20px;
}

.rome-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rome-form-group-half {
    flex: 1;
}

.rome-form-group label {
    color: #F5F5F5;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.rome-form-group label .required {
    color: #FF8C00;
    margin-left: 2px;
}

/* =====================================================
   INPUTS Y SELECTS
   ===================================================== */
.rome-contacto-form input[type="text"],
.rome-contacto-form input[type="email"],
.rome-contacto-form input[type="tel"],
.rome-contacto-form select,
.rome-contacto-form textarea {
    width: 100%;
    padding: 14px 16px;
    background-color: #252a33;
    border: 2px solid #3a4150;
    border-radius: 8px;
    color: #F5F5F5;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rome-contacto-form input[type="text"]:focus,
.rome-contacto-form input[type="email"]:focus,
.rome-contacto-form input[type="tel"]:focus,
.rome-contacto-form select:focus,
.rome-contacto-form textarea:focus {
    outline: none;
    border-color: #FF8C00;
    background-color: #2a303a;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.15);
}

.rome-contacto-form input::placeholder,
.rome-contacto-form textarea::placeholder {
    color: #666;
}

.rome-contacto-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.rome-contacto-form select option {
    background-color: #252a33;
    color: #F5F5F5;
    padding: 10px;
}

.rome-contacto-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* =====================================================
   CHECKBOX DE PRIVACIDAD
   ===================================================== */
.rome-form-privacy {
    margin-top: 5px;
}

.rome-form-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #A0A0A0;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.4;
}

.rome-form-privacy input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #FF8C00;
    cursor: pointer;
    flex-shrink: 0;
}

.rome-form-privacy a {
    color: #FF8C00;
    text-decoration: none;
}

.rome-form-privacy a:hover {
    text-decoration: underline;
}

/* =====================================================
   BOTÓN DE ENVÍO
   ===================================================== */
.rome-contacto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FF8C00 0%, #e67e00 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.rome-contacto-btn:hover {
    background: linear-gradient(135deg, #e67e00 0%, #cc7000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
}

.rome-contacto-btn:active {
    transform: translateY(0);
}

.rome-contacto-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.rome-contacto-btn .btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Spinner animado */
.rome-contacto-btn .spinner {
    animation: rotate 1s linear infinite;
    width: 20px;
    height: 20px;
}

.rome-contacto-btn .spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Botón secundario */
.rome-btn-secondary {
    background: transparent;
    border: 2px solid #FF8C00;
    color: #FF8C00;
}

.rome-btn-secondary:hover {
    background: rgba(255, 140, 0, 0.1);
    box-shadow: none;
}

/* =====================================================
   MENSAJES DE ÉXITO Y ERROR
   ===================================================== */
.rome-contacto-message {
    text-align: center;
    padding: 40px;
    border-radius: 12px;
}

.rome-message-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.rome-success .rome-message-icon {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.rome-error .rome-message-icon {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.rome-contacto-message h3 {
    color: #F5F5F5;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.rome-contacto-message p {
    color: #A0A0A0;
    font-size: 15px;
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.rome-message-email {
    margin-top: 20px !important;
    padding: 15px;
    background: rgba(255, 140, 0, 0.1);
    border-radius: 8px;
}

.rome-message-email strong {
    color: #FF8C00;
}

.rome-contacto-message .rome-contacto-btn {
    margin-top: 25px;
    width: auto;
    display: inline-flex;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .rome-contacto-container {
        padding: 25px;
        margin: 15px;
        border-radius: 12px;
    }
    
    .rome-contacto-titulo {
        font-size: 22px;
    }
    
    .rome-contacto-subtitulo {
        font-size: 14px;
    }
    
    .rome-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .rome-contacto-form input[type="text"],
    .rome-contacto-form input[type="email"],
    .rome-contacto-form input[type="tel"],
    .rome-contacto-form select,
    .rome-contacto-form textarea {
        padding: 12px 14px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .rome-contacto-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .rome-contacto-message {
        padding: 30px 20px;
    }
    
    .rome-message-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .rome-contacto-message h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .rome-contacto-container {
        padding: 20px;
        margin: 10px;
    }
    
    .rome-contacto-titulo {
        font-size: 20px;
    }
    
    .rome-form-privacy label {
        font-size: 12px;
    }
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
.rome-contacto-form {
    animation: fadeIn 0.5s ease;
}

.rome-contacto-message {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   ESTADOS DE VALIDACIÓN
   ===================================================== */
.rome-contacto-form input:invalid:not(:placeholder-shown),
.rome-contacto-form select:invalid:not([value=""]),
.rome-contacto-form textarea:invalid:not(:placeholder-shown) {
    border-color: #F44336;
}

.rome-contacto-form input:valid:not(:placeholder-shown),
.rome-contacto-form textarea:valid:not(:placeholder-shown) {
    border-color: #4CAF50;
}
