/* Frontend CSS para Cobertura Checker */

.cobertura-checker-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.cobertura-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cobertura-select-wrapper {
    position: relative;
}

.cobertura-select {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    background-color: #f5f5f5;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
    transition: all 0.3s ease;
}

.cobertura-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #e9ecef;
}

.cobertura-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.cobertura-button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    width: 100%;
}

.cobertura-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cobertura-button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cobertura-button:not(:disabled):active {
    transform: translateY(0);
}

/* Modal */
.cobertura-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.cobertura-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cobertura-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.cobertura-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.cobertura-modal-close:hover {
    color: #333;
}

.cobertura-modal-content h3 {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #333;
    padding-right: 30px;
}

.cobertura-lead-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cobertura-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cobertura-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.cobertura-input {
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.cobertura-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.cobertura-submit-button {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cobertura-submit-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.cobertura-submit-button:active {
    transform: translateY(0);
}

.cobertura-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cobertura-loading {
    text-align: center;
    color: #4CAF50;
    font-weight: 600;
    padding: 10px;
}

.cobertura-message {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.cobertura-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

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

/* Responsive */
@media (max-width: 768px) {
    .cobertura-selects {
        grid-template-columns: 1fr;
    }
    
    .cobertura-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .cobertura-modal-content h3 {
        font-size: 18px;
    }
}

/* Animación de carga */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cobertura-loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 3px solid #4CAF50;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}
