/* WooCommerce Cautious Price Popup Styles - RTL Optimized */

/* Overlay */
.wccp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wccp-overlay.wccp-active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.wccp-popup {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    padding: 30px;
    position: relative;
    direction: rtl;
    text-align: right;
    font-family: inherit;
    box-sizing: border-box;
}

/* Close Button */
.wccp-popup-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.wccp-popup-close:hover,
.wccp-popup-close:focus {
    color: #000;
    outline: none;
}

/* Logo */
.wccp-popup-logo {
    text-align: center;
    margin-bottom: 15px;
}
.wccp-popup-logo img {
    max-height: 80px;
    width: auto;
}

/* Title */
.wccp-popup-title {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

/* Product Info */
.wccp-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wccp-product-name {
    font-weight: 600;
    font-size: 16px;
    color: #222;
}

.wccp-product-price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: 700;
}

/* Buttons Container */
.wccp-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.wccp-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
    width: 100%;
}

.wccp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Immediate Purchase Button */
.wccp-btn-immediate {
    background: #2ecc71;
    color: #fff;
}

.wccp-btn-immediate:hover:not(:disabled) {
    background: #27ae60;
}

/* Cheaper Request Button (customizable via admin) - default style */
.wccp-btn-cheaper {
    background: #3498db;
    color: #fff;
    border-radius: 8px;
    padding: 14px 20px;
}

.wccp-btn-cheaper:hover:not(:disabled) {
    background: #2980b9;
}

/* Cheaper Form */
.wccp-cheaper-form {
    margin-top: 15px;
}

.wccp-mobile-field {
    margin-bottom: 15px;
}

.wccp-mobile-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wccp-mobile-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    direction: ltr; /* for mobile numbers */
    text-align: left;
}

.wccp-error-message {
    color: #e74c3c;
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

/* Submit Button */
.wccp-btn-submit {
    background: #f39c12;
    color: #fff;
}

.wccp-btn-submit:hover:not(:disabled) {
    background: #e67e22;
}

/* Message Area */
.wccp-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

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

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

/* Footer */
.wccp-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

.wccp-footer a {
    color: #3498db;
    text-decoration: none;
}

.wccp-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .wccp-popup {
        padding: 20px;
        width: 95%;
    }
    .wccp-popup-title {
        font-size: 20px;
    }
    .wccp-btn {
        font-size: 14px;
        padding: 12px;
    }
}