/**
 * Quick Quote Popup Styles
 *
 * @package WC_Cere_Oferta
 */

/* Overlay */
.wcco-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wcco-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container */
.wcco-popup-container {
    background: #ffffff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.wcco-popup-overlay.active .wcco-popup-container {
    transform: translateY(0);
}

/* Close button */
.wcco-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wcco-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* Header */
.wcco-popup-header {
    text-align: center;
    margin-bottom: 20px;
}

.wcco-popup-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.wcco-popup-description {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Product info */
.wcco-popup-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wcco-popup-product-image {
    flex-shrink: 0;
}

.wcco-popup-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.wcco-popup-product-info h3 {
    margin: 0 0 5px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.wcco-popup-product-price {
    font-size: 14px;
    color: #666;
}

/* Form */
.wcco-popup-form {
    margin: 0;
}

.wcco-form-row {
    margin-bottom: 15px;
}

.wcco-form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.wcco-form-row label .required {
    color: #e74c3c;
}

.wcco-form-row input[type="text"],
.wcco-form-row input[type="email"],
.wcco-form-row input[type="tel"],
.wcco-form-row input[type="number"],
.wcco-form-row textarea,
.wcco-form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wcco-form-row input:focus,
.wcco-form-row textarea:focus,
.wcco-form-row select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.wcco-form-row input.error,
.wcco-form-row textarea.error,
.wcco-form-row select.error {
    border-color: #e74c3c;
}

.wcco-form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.wcco-form-row input[type="number"] {
    max-width: 100px;
}

/* Submit button */
.wcco-form-submit {
    margin-top: 20px;
}

.wcco-submit-quote-button {
    width: 100%;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background-color: #2196F3 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.2s !important;
}

.wcco-submit-quote-button:hover {
    background-color: #1976D2 !important;
}

.wcco-submit-quote-button:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
}

.wcco-submit-quote-button.loading {
    position: relative;
    color: transparent !important;
}

.wcco-submit-quote-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcco-spin 0.8s linear infinite;
}

@keyframes wcco-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.wcco-form-messages {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.wcco-form-messages.error {
    background-color: #fdeaea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.wcco-form-messages.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Success state */
.wcco-popup-success {
    text-align: center;
    padding: 20px 0;
}

.wcco-success-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
}

.wcco-popup-success h3 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #333;
}

.wcco-popup-success p {
    margin: 0 0 20px 0;
    color: #666;
}

.wcco-popup-close-btn {
    padding: 10px 30px !important;
}

/* Responsive */
@media (max-width: 480px) {
    .wcco-popup-container {
        padding: 20px;
    }

    .wcco-popup-header h2 {
        font-size: 20px;
    }

    .wcco-popup-product {
        flex-direction: column;
        text-align: center;
    }
}
