/**
 * Mundial Form Styles
 */

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

/* Mensajes de alerta */
.mundial-form-messages {
    margin-bottom: 20px;
}

.mundial-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    animation: slideIn 0.3s ease;
}

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

.mundial-alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.mundial-alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.mundial-alert-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.mundial-alert-message {
    flex: 1;
}

/* Campo con error */
.error-field {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.error-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

/* Botón de envío deshabilitado */
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .mundial-form-container {
        padding: 10px;
    }
    
    .mundial-alert {
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* Indicador de carga */
.mundial-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* Estilos para el tooltip del descriptor de factura */
.form-col {
    position: relative;
}

.form-col label {
    position: relative;
    display: block;
}

.help-icon {
    display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: #007bff;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-right: -26px;
  transition: all 0.3s ease;
  position: relative;
  top: -4px;
}

.help-icon:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

.factura-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fffbea;
    border: 2px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 10px;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.form-col:hover .factura-tooltip,
.help-icon:hover + .factura-tooltip,
.factura-tooltip:hover {
    display: block;
}

.tooltip-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 12px 0;
    text-align: center;
}

.tooltip-examples {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tooltip-example {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.example-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.example-text {
    font-size: 14px;
    color: #333;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.example-text .highlight {
    color: #007bff;
    font-weight: bold;
    background-color: #e3f2fd;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #007bff;
}

/* Estilos para el input de factura */


#factura::placeholder {
    letter-spacing: normal;
    font-weight: normal;
    font-size: 14px;
}

/* Responsive para tooltip */
@media (max-width: 768px) {
    .factura-tooltip {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .example-text {
        font-size: 12px;
    }
}
