/**
 * Frontend Styles
 *
 * @package IWD_WhatsApp_Order
 */

/* WhatsApp Button Styles */
.iwd-whatsapp-button {
    display: flex !important;
    vertical-align: middle;
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 5px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-items: center;
}

.iwd-whatsapp-button:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.iwd-whatsapp-icon {
    width: 19px;
    height: 19px;
    display: inline-block;
    vertical-align: middle;
}

.occowc-whatsapp-wrap {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}
.occowc-whatsapp-wrap .iwd-whatsapp-button {
    display: inline-block;
}

/* Variation Error Message */
.iwdquo-variation-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #f8d7da;
    border-radius: 5px;
    display: none;
}

/* Popup Overlay */
.iwdquo-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    animation: iwdFadeIn 0.3s;
}

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

/* Popup Content */
.iwdquo-popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: iwdSlideIn 0.3s;
}

@keyframes iwdSlideIn {
    from { 
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to { 
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* Popup Header */
.iwdquo-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.iwdquo-popup-title {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.iwdquo-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.iwdquo-popup-close:hover {
    color: #fff;
    background-color: #000;
}

/* Popup Product Info */
.iwdquo-popup-product-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.iwdquo-popup-product-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.iwdquo-popup-product-price {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 5px;
}

.iwdquo-popup-price-breakdown {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    font-size: 14px;
}

.iwdquo-popup-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #666;
}

.iwdquo-popup-price-row.total {
    font-weight: 700;
    font-size: 16px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid #ddd;
}

/* Popup Form (iwdquo prefix) */
.iwdquo-popup-form-group {
    margin-bottom: 15px;
}

.iwdquo-popup-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.iwdquo-popup-input,
.iwdquo-popup-textarea {
    width: 100%;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
    transition: border-color 0.3s !important;
    box-sizing: border-box !important;
    border-radius: 4px !important;
}

.iwdquo-popup-input:focus,
.iwdquo-popup-textarea:focus {
    outline: none;
    border: 1px solid #8b8b8b !important;
}

.iwdquo-popup-textarea {
    resize: vertical;
    min-height: 80px;
}

.iwdquo-popup-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

/* Popup Buttons */
.iwdquo-popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.iwdquo-popup-submit {
    flex: 1;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.iwdquo-popup-submit:hover {
    opacity: 0.9;
}

.iwdquo-popup-cancel {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.iwdquo-popup-cancel:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 600px) {
    .iwdquo-popup-content {
        width: 95%;
        padding: 20px;
    }
    
    .iwdquo-popup-title {
        font-size: 18px;
    }
    
    .iwdquo-popup-buttons {
        flex-direction: column;
    }
}
