/* WhatsApp Enquiry Button Styles */
.uae-we-btn {
    background-color: #25D366;
    color: white !important;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-block;
    margin: 10px 0;
    text-align: center;
    width: 100%;
    max-width: 250px;
}

.uae-we-btn:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.uae-we-btn-single {
    font-size: 16px;
    padding: 10px 10px;
    max-width: 200px;
}

.uae-we-btn-shortcode {
    display: inline-block !important;
    width: auto !important;
}

/* Button container */
.uae-we-button-container {
    margin: 15px 0;
    clear: both;
}

.single-product .uae-we-button-container {
    margin-top: 10px;
}

/* Modal Styles - COMPACT VERSION */
.uae-we-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 15px;
    box-sizing: border-box;
}

.uae-we-modal-open {
    overflow: hidden;
}

.uae-we-modal-content {
    background-color: #fff;
    margin: 15px auto;
    padding: 0;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: slideIn 0.3s;
    position: relative;
}

.uae-we-modal-header {
    background-color: #25D366;
    color: white;
    padding: 12px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.uae-we-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
}

.uae-we-close {
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.uae-we-close:hover {
    background-color: rgba(255,255,255,0.2);
}

.uae-we-modal-body {
    padding: 15px;
}

/* Compact Form Layout */
.uae-we-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.uae-we-form-group {
    flex: 1;
    min-width: calc(50% - 5px);
    margin-bottom: 5px;
}

.uae-we-form-group.full-width {
    min-width: 100%;
    flex: 0 0 100%;
    margin-bottom: 5px;
}

.uae-we-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 12px;
}

.uae-we-form-group label[for]::after {
    content: " *";
    color: #ff0000;
    opacity: 0;
}

.uae-we-form-group label[for]:has(+ :required)::after {
    opacity: 1;
}

.uae-we-input,
.uae-we-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background-color: #fff;
}

.uae-we-input:focus,
.uae-we-textarea:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.uae-we-textarea {
    resize: vertical;
    min-height: 70px;
    max-height: 100px;
}

.uae-we-form-group small {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 10px;
    line-height: 1.2;
}

/* Form Actions */
.uae-we-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.uae-we-submit {
    flex: 2;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.uae-we-submit:hover {
    background-color: #128C7E;
}

.uae-we-cancel {
    flex: 1;
    background-color: #f8f8f8;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.uae-we-cancel:hover {
    background-color: #e8e8e8;
}

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

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

/* Mobile Responsive */
@media (max-width: 480px) {
    .uae-we-modal {
        padding: 8px;
    }
    
    .uae-we-modal-content {
        margin: 8px auto;
        max-width: 95%;
        max-height: 95vh;
    }
    
    .uae-we-modal-header {
        padding: 10px 12px;
    }
    
    .uae-we-modal-header h3 {
        font-size: 14px;
    }
    
    .uae-we-modal-body {
        padding: 12px;
    }
    
    .uae-we-form-row {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .uae-we-form-group {
        min-width: 100%;
        margin-bottom: 6px;
    }
    
    .uae-we-input,
    .uae-we-textarea {
        padding: 7px 9px;
        font-size: 12px;
    }
    
    .uae-we-form-actions {
        flex-direction: column;
        gap: 6px;
        margin-top: 12px;
    }
    
    .uae-we-submit,
    .uae-we-cancel {
        flex: none;
        width: 100%;
        padding: 9px;
    }
    
    .uae-we-btn {
        padding: 9px 15px;
        font-size: 13px;
        max-width: 100%;
    }
    
    .uae-we-btn-single {
        font-size: 14px;
        padding: 10px 20px;
    }
}

/* Tablet and Desktop */
@media (min-width: 481px) and (max-width: 768px) {
    .uae-we-modal-content {
        max-width: 90%;
    }
    
    .uae-we-form-group {
        min-width: calc(50% - 5px);
    }
}

/* Ensure modal fits on small screens */
@media (max-height: 600px) {
    .uae-we-modal-content {
        max-height: 95vh;
        margin: 5px auto;
    }
    
    .uae-we-textarea {
        min-height: 60px;
        max-height: 80px;
    }
    
    .uae-we-form-row {
        margin-bottom: 5px;
    }
    
    .uae-we-form-group {
        margin-bottom: 5px;
    }
}

/* Quantity field styling */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}