/* CSS para Template Login - HioposRD */

body {
    background-color: #f7f9fc;
}

.login-page {
    min-height: 100vh;
    background: #f7f9fc;
    padding: 3rem 1rem;
}

.login-container {
    max-width: 1200px;
    margin: 0 auto;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .login-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.login-form-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    position: relative;
}

@media (min-width: 768px) {
    .login-form-container {
        padding: 3rem;
    }
}

.login-features {
    background: #330505;
    color: white;
    border-radius: 1rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-features-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(230, 57, 70, 0.2), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.login-features-content {
    position: relative;
    z-index: 2;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
}

.login-features-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 3;
}

.remember-me-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input {
    width: 1rem;
    height: 1rem;
    accent-color: #e53e3e;
}

.forgot-password {
    color: #e53e3e;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.875rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.submit-button:hover {
    background-color: #c53030;
}

.submit-button svg {
    margin-left: 0.5rem;
}

.form-divider {
    position: relative;
    margin: 1.5rem 0;
    height: 1px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.form-divider-text {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 0 0.5rem;
    background-color: white;
    color: #6b7280;
    font-size: 0.875rem;
}

.toggle-form-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-form-button:hover {
    background-color: #f9fafb;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: #e53e3e;
    color: white;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: #d1d5db;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.hidden {
    display: none;
}

/* Estilos específicos para móviles */
@media (max-width: 768px) {
    .remember-me-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .login-form-container {
        border-radius: 0.75rem;
    }

    .login-features {
        display: none;
    }
}

/* Estilos para validación de email y teléfono */
.form-help {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-style: italic;
}

/* Contenedor del teléfono con país */
.phone-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-selector {
    flex: 0 0 120px;
}

.phone-input-container {
    flex: 1;
}

.country-select {
    width: 100%;
    height: 100%;
    padding: 0.75rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.country-select:focus {
    outline: none;
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.phone-number-input {
    padding-left: 2.75rem !important;
}

/* Iconos de validación */
.validation-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.validation-icon.valid {
    color: #10b981;
    opacity: 1;
}

.validation-icon.invalid {
    color: #ef4444;
    opacity: 1;
}

.form-input.valid {
    border-color: #10b981;
}

.form-input.invalid {
    border-color: #ef4444;
}

/* Estados de carga */
.submit-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.submit-button.loading::after {
    content: '';
    margin-left: 8px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Responsive */
@media (max-width: 640px) {
    .phone-container {
        flex-direction: column;
        gap: 8px;
    }

    .country-selector {
        flex: none;
    }
}