/**
 * Super Catalog Mode Pro - Frontend Styles
 *
 * @package Super_Catalog_Mode_Pro
 * @since 1.0.0
 */

/* ===========================================
   1. Buttons & General UI
   =========================================== */
.scmp-button-wrapper {
    margin: 15px 0;
}

.scmp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 15px;
    gap: 8px;
    line-height: 1.4;
    background-color: #2271b1;
    color: #fff;
}

.scmp-button:hover,
.scmp-button:focus {
    background-color: #135e96;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

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

/* Secondary Button */
.scmp-button-secondary {
    background: #f6f7f9;
    color: #2c3338;
    border: 1px solid #dcdcde;
}

.scmp-button-secondary:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
}

/* Price Replacement Label */
.scmp-price-label {
    display: inline-block;
    padding: 8px 16px;
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
}

/* ===========================================
   2. Hide Classes (CSS Failsafes)
   =========================================== */
.product.scmp-hide-price .price,
.product.scmp-hide-price .amount,
.scmp-hide-price span.price,
.scmp-hide-price div.price,
.scmp-hide-price .woocommerce-Price-amount {
    display: none !important;
}

.product.scmp-hide-cart .cart,
.product.scmp-hide-cart form.cart,
.product.scmp-hide-cart .add_to_cart_button,
.product.scmp-hide-cart .single_add_to_cart_button,
.product.scmp-hide-cart .quantity,
.product.scmp-hide-cart .product_type_simple,
.product.scmp-hide-cart .product_type_variable,
.product.scmp-hide-cart .product_type_grouped,
.scmp-hide-cart .add_to_cart_button,
.scmp-hide-cart form.cart,
.scmp-hide-cart .quantity {
    display: none !important;
}

/* Keep inquiry button visible */
.scmp-button.scmp-inquiry-trigger,
.scmp-inquiry-trigger {
    display: inline-flex !important;
}

/* ===========================================
   3. Modal Styles
   =========================================== */
.scmp-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.scmp-modal.active {
    display: block;
}

.scmp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.scmp-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: scmpModalSlideIn 0.3s ease;
}

@keyframes scmpModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.scmp-close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f1;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #646970;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
}

.scmp-close-modal:hover {
    background: #d63638;
    color: #fff;
}

.scmp-modal-header h3 {
    margin: 0 0 25px;
    padding-right: 40px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}

/* ===========================================
   4. Form Styles
   =========================================== */
.scmp-inquiry-form {
    display: block;
}

.scmp-form-row {
    margin-bottom: 18px;
}

.scmp-form-row:last-child {
    margin-bottom: 0;
}

.scmp-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.scmp-form-row .required {
    color: #d63638;
    margin-left: 2px;
}

.scmp-form-row input[type="text"],
.scmp-form-row input[type="email"],
.scmp-form-row input[type="tel"],
.scmp-form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.scmp-form-row input:focus,
.scmp-form-row textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.scmp-form-row input.error,
.scmp-form-row textarea.error {
    border-color: #d63638;
}

.scmp-form-row textarea {
    min-height: 100px;
    resize: vertical;
}

.scmp-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    margin-top: 10px;
    font-weight: 600;
}

.scmp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===========================================
   5. Success State
   =========================================== */
.scmp-form-success {
    text-align: center;
    padding: 30px 20px;
}

.scmp-success-icon {
    font-size: 60px;
    color: #00a32a;
    margin-bottom: 15px;
    line-height: 1;
}

.scmp-form-success h3 {
    color: #1d2327;
    margin: 0 0 10px;
    font-size: 22px;
}

.scmp-form-success p {
    color: #646970;
    margin: 0 0 25px;
    font-size: 15px;
}

/* ===========================================
   6. Responsive
   =========================================== */
@media (max-width: 768px) {
    .scmp-modal-overlay {
        padding: 15px;
        align-items: flex-start;
    }
    
    .scmp-modal-content {
        padding: 25px 20px;
        border-radius: 8px;
        margin: 20px 0;
    }
    
    .scmp-modal-header h3 {
        font-size: 18px;
        padding-right: 35px;
    }
    
    .scmp-button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .scmp-close-modal {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ===========================================
   7. Print Styles
   =========================================== */
@media print {
    .scmp-modal,
    .scmp-button,
    .scmp-inquiry-trigger {
        display: none !important;
    }
}
