/**
 * WhatsApp Product Inquiry - Frontend Styles
 */

/* WhatsApp Button Container */
.wpi-whatsapp-container {
    margin: 20px 0;
    clear: both;
}

/* WhatsApp Button */
.wpi-whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 400;
    border: none;
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    width: 100%;
    max-width: 350px;
    border-color: #25d366 !important;
    background-color: #25d366 !important;
    color: #fff !important;
}

.wpi-whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    border-color: #25d366 !important;
    background-color: #25d366 !important;
    color: #fff !important;
}

.wpi-whatsapp-button:active {
    transform: translateY(0);
}

.wpi-whatsapp-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.wpi-whatsapp-button svg {
    flex-shrink: 0;
}

/* Button States */
.wpi-button-ready {
    animation: pulse 2s infinite;
}

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

.wpi-button-disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.wpi-button-shake {
    animation: wpi-shake 0.4s ease;
}

/* Reminder Message */
.wpi-reminder {
    margin-top: 10px;
    padding: 12px 16px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    font-weight: 400;
}

/* Custom Sizes Button */
.custom-dimensions-toggle-wrapper {
    margin: 15px 0;
}

.custom-sizes-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-sizes-button:hover {
    background: #e9ecef;
    border-color: #25d366;
    color: #25d366;
}

.custom-sizes-button.active {
    background: #25d366;
    border-color: #25d366;
    color: white;
}

.custom-sizes-button svg {
    stroke: currentColor;
}

/* Custom Dimensions Wrapper */
.custom-dimensions-wrapper {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.custom-dimensions-wrapper h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
}

.dimensions-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.dimension-field {
    margin-bottom: 15px;
}

.dimension-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.dimension-field input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.dimension-field input[type="number"]:focus {
    border-color: #25d366;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
}

.dimension-help {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.required {
    color: #e74c3c;
}

.dimension-preview {
    margin-top: 20px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 2px dashed #ddd;
}

.dimension-preview strong {
    color: #333;
}

#dimension_display {
    color: #25d366;
    font-size: 18px;
    font-weight: 600;
}

/* Clear Button */
.clear-dimensions-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-dimensions-button:hover {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.clear-dimensions-button svg {
    stroke: currentColor;
}

/* Error Highlighting */
.wpi-highlight-error,
.variations select.wpi-highlight-error,
input[type="number"].wpi-highlight-error {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
    animation: wpi-shake 0.4s ease;
}

/* Loading Spinner */
.wpi-spinner {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Price Hidden Text */
.wpi-price-hidden {
    font-size: 16px;
    font-weight: 400;
    color: #25D366;
    display: inline-block;
    padding: 5px 0;
}

/* Hide original add to cart button */
.single-product .single_add_to_cart_button,
.single-product form.cart .button {
    display: none !important;
}

/* Hide quantity field */
.wl-quantity-wrap {
    display: none !important;
}

/* Keep variations visible */
.single-product .variations {
    display: table !important;
}

.single-product .variations_form {
    display: block !important;
}

/* Animations */
@keyframes wpi-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .wpi-whatsapp-button {
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .wpi-reminder {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .custom-sizes-button {
        width: 100%;
        justify-content: center;
    }
    
    .dimension-field input[type="number"] {
        max-width: 100%;
    }
}