/* Estilos Generales */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.content .logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.content h1 {
    font-size: 2em;
    color: #b61e25;
    margin-bottom: 10px;
}

.content p {
    font-size: 1em;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.5;
}

.content p strong {
    color: #162640;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form input,
form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

/* Estilos específicos para el grupo de selección y campos combinados */
.select-group {
    display: flex;
    position: relative;
    gap: 0;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.select-group i {
    position: absolute;
    left: 15px;
    color: #b61e25;
    font-size: 1.2rem;
    z-index: 10;
}

.select-group input {
    border: none;
    padding-left: 45px;
}

/* Separación para campos de nombre/apellido unidos */
.select-group input[name="first_name"] {
    border-right: 1px dotted #ccc;
}

.select-group input[name="email"],
.select-group input[name="address"] {
    flex-grow: 1;
}

/* Estilo para el Teléfono (Phone Code + Number) */
.phone-code {
    border: none !important;
    width: 22% !important;
    padding-left: 45px !important;
    background-color: transparent;
    cursor: pointer;
}

.phone-number {
    width: 78% !important;
    border: none !important;
    border-left: 1px dotted #ccc !important;
    border-radius: 0 !important;
}

/* Estilo para el contenedor que agrupa los campos de país, estado y ciudad */
.country-state-city {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 0;
    display: flex;
}

.country-state-city i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b61e25;
    font-size: 1.2rem;
    z-index: 10;
}

.country-state-city select {
    border: none;
    flex: 1;
    min-width: 0; /* Evita que el select se desborde */
}

.country-state-city select:not(:last-child) {
    border-right: 1px dotted #ccc;
}

.country-state-city select[name="country"] {
    padding-left: 45px;
}

/* Checkbox y Términos */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    justify-content: center;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Botón Principal (Estandarizado como .btn-primary) */
.btn-primary {
    display: flex;
    margin-top: 14px;
    background: #b61e25;
    color: #fff;
    font-weight: 800;
    padding: 14px 36px;
    border: none;
    border-radius: 50% 1000px;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 4px 16px #b61e2533;
    transition: background 0.2s, transform 0.2s;
    letter-spacing: 0.03em;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.btn-primary.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

.btn-primary:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
    color: #666 !important;    
}

.btn-primary.loading {
    color: transparent !important;
    position: relative;
    pointer-events: none;
}

.btn-primary:hover:not(:disabled) {
    background: #7f151a;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

/* Mensajes de feedback */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none; /* Se activa con JS */
    font-size: 1rem;
    text-align: center;
    border: 1px solid transparent;
}

.message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.info {
    display: block;
    background-color: #D4E3ED;
    color: #4885AD;
    border: 1px solid #B0CCDE;
}

.message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Password Strength & Rules */
.strength-indicator {
    background-color: #eee;
    height: 8px;
    margin-top: 5px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.strength-indicator::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 4px;
}

.strength-indicator.weak::after { width: 33%; background-color: #e74c3c; }
.strength-indicator.medium::after { width: 66%; background-color: #f39c12; }
.strength-indicator.strong::after { width: 100%; background-color: #2ecc71; }

.message-small {
    font-size: 0.8em;
    margin-top: 5px;
}

#passwordRules ul {
    list-style-type: none;
    text-align: left;
    padding-left: 0;
}

/* Agente y Password Toggle */
.agent-group, .password-group {
    position: relative;
    width: 100%;
}

.agent-group i, .password-group .toggle-password {
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
}

.agent-group i { left: 15px; color: #b61e25; font-size: 1.2rem; }
.password-group .toggle-password { right: 15px; cursor: pointer; color: #b61e25; font-size: 1.2rem; }

.agent-group select {
    padding-left: 45px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none" stroke="%23888" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

/* Utilidades */
.hidden-field {
    display: none !important;
}

.honey-pot-field {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

.back-link {
    display: block;
    margin-top: 20px;
    color: #162640;
    text-decoration: none;
    font-size: 0.9em;
}

.back-link:hover {
    text-decoration: underline;
}

/* Password Requirements Box */
.password-requirements-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-top: 5px;
    margin-bottom: 15px;
    text-align: left;
    transition: all 0.3s ease;
}

.strength-meter-label {
    font-size: 0.85rem;
    color: #162640;
    margin-bottom: 5px;
    font-weight: bold;
}

.strength-meter {
    background-color: #eee;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

#strength-bar {
    height: 100%;
    width: 0%;
    background-color: #e74c3c;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.rules-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rules-list li {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.rules-list li i {
    font-size: 0.7rem;
}

/* Estilo para los inputs de contraseña */
.password-group input {
    padding-right: 45px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto de foco en el grupo cuando las reglas aparecen */
.password-group:focus-within + .password-requirements-box {
    border-color: #b61e2555;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#verify_code{
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    color: #2A4D65;
    font-family: monospace;
    background-color: #D4E3ED;
    border: 2px dashed #B0CCDE;
    border-radius: 10px;    
}

#btn-complete-reg{
    background: #396989;
    color: #fff; font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 20px;
    border: none; border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px #E6EFF533;
    transition: background 0.2s, transform 0.2s;
    letter-spacing: 0.03em;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-top: 5px;
}
#btn-complete-reg:hover{
    background: #4885AD;
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}