/**
 * ONE CLICK LEAD - Styles
 * 
 * @package OneClickLead
 * @version 1.7.0
 */

/* ============================================
   QUICK BUY BUTTON
   ============================================ */
.ocl-quick-buy-btn {
    display: inline-block;
    background: transparent;
    color: #ab1e40;
    border: 2px solid #ab1e40;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
    border-radius: 4px;
    box-sizing: border-box;
}

.ocl-quick-buy-btn:hover {
    background: #ab1e40;
    color: #fff;
}

/* Button in product loop - MUST MATCH Add to Cart size */
.ocl-quick-buy-btn-loop,
button.ocl-quick-buy-btn-loop,
.woocommerce .ocl-quick-buy-btn-loop,
.woocommerce-page .ocl-quick-buy-btn-loop {
    display: block !important;
    width: 100% !important;
    margin: 10px 0 0 0 !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    box-sizing: border-box !important;
    background: transparent !important;
    color: #ab1e40 !important;
    border: 1px solid #ab1e40 !important;
    border-radius: 4px !important;
    line-height: 1.4 !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
}

.ocl-quick-buy-btn-loop:hover,
button.ocl-quick-buy-btn-loop:hover,
.woocommerce .ocl-quick-buy-btn-loop:hover {
    background: #ab1e40 !important;
    color: #fff !important;
}

/* Large button (instead of add to cart) */
.ocl-instead-wrapper {
    margin: 20px 0;
}

.ocl-quick-buy-btn-large {
    display: block;
    width: 100%;
    padding: 18px 30px;
    font-size: 16px;
    background: #ab1e40;
    color: #fff;
    border: none;
    margin: 0;
}

.ocl-quick-buy-btn-large:hover {
    background: #8a1833;
}

/* Button in popup modal */
.ocl-quick-buy-btn-popup {
    display: block;
    width: 100%;
    margin: 15px 0 0 0;
    padding: 14px 20px;
    font-size: 13px;
}

/* ============================================
   POPUP OVERLAY
   ============================================ */
.ocl-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ocl-popup-overlay.active {
    display: flex;
}

/* ============================================
   POPUP WINDOW
   ============================================ */
.ocl-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: oclPopupIn 0.3s ease;
}

@keyframes oclPopupIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close button */
.ocl-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ocl-popup-close:hover {
    background: #ab1e40;
    color: #fff;
}

/* Popup title */
.ocl-popup-title {
    font-family: inherit;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 25px 0;
    text-align: center;
}

/* ============================================
   PRODUCT INFO
   ============================================ */
.ocl-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 25px;
}

.ocl-product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.ocl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ocl-product-details {
    flex: 1;
}

.ocl-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

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

.ocl-product-price del {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.ocl-product-price ins {
    text-decoration: none;
}

.ocl-product-nominal {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* Мобильная версия: вес/номинал сразу после цены в одну линию */
@media (max-width: 768px) {
    .ocl-product-details .ocl-product-price {
        display: inline;
    }
    .ocl-product-details .ocl-product-nominal {
        display: inline;
        margin-top: 0;
        margin-left: 6px;
    }
}

/* ============================================
   QUANTITY CONTROL
   ============================================ */
.ocl-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ocl-quantity-wrapper label {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.ocl-quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.ocl-qty-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    font-size: 20px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ocl-qty-btn:hover {
    background: #ab1e40;
    color: #fff;
}

.ocl-qty-btn:active {
    transform: scale(0.95);
}

.ocl-qty-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.ocl-qty-input::-webkit-outer-spin-button,
.ocl-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ocl-qty-input:focus {
    outline: none;
}

/* ============================================
   FORM
   ============================================ */
.ocl-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ocl-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ocl-form-row label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.ocl-form-row label .required {
    color: #ab1e40;
}

.ocl-form-row input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    color: #333;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ocl-form-row input:focus {
    outline: none;
    border-color: #ab1e40;
}

.ocl-form-row input::placeholder {
    color: #aaa;
}

/* Form buttons */
.ocl-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ocl-submit-btn {
    flex: 1;
    padding: 16px 24px;
    background: #ab1e40;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ocl-submit-btn:hover {
    background: #8a1833;
}

.ocl-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ocl-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ocl-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: oclSpin 0.8s linear infinite;
}

@keyframes oclSpin {
    to { transform: rotate(360deg); }
}

.ocl-cancel-btn {
    padding: 16px 24px;
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ocl-cancel-btn:hover {
    border-color: #999;
    color: #333;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */
.ocl-success-message {
    text-align: center;
    padding: 20px 0;
}

.ocl-success-icon {
    width: 70px;
    height: 70px;
    background: #27ae60;
    color: #fff;
    font-size: 36px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.ocl-success-message p {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin: 0 0 25px 0;
}

.ocl-close-success-btn {
    padding: 14px 40px;
    background: #27ae60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ocl-close-success-btn:hover {
    background: #219a52;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .ocl-popup {
        padding: 25px 20px;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        animation: oclPopupInMobile 0.3s ease;
    }
    
    @keyframes oclPopupInMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .ocl-popup-title {
        font-size: 20px;
    }
    
    .ocl-quick-buy-btn {
        display: block;
        width: 100%;
        margin: 10px 0 0 0;
        color: #ab1e40 !important;
        border-color: #ab1e40 !important;
    }
    
    .ocl-quick-buy-btn:hover {
        background: #ab1e40 !important;
        color: #fff !important;
    }
    
    .ocl-quick-buy-btn-loop,
    button.ocl-quick-buy-btn-loop {
        color: #ab1e40 !important;
        border-color: #ab1e40 !important;
    }
    
    .ocl-quick-buy-btn-loop:hover,
    button.ocl-quick-buy-btn-loop:hover {
        background: #ab1e40 !important;
        color: #fff !important;
    }
    
    .ocl-quick-buy-btn-large {
        background: #ab1e40 !important;
    }
    
    .ocl-quick-buy-btn-large:hover {
        background: #8a1833 !important;
    }
    
    .ocl-popup-close:hover {
        background: #ab1e40 !important;
    }
    
    .ocl-product-price {
        color: #ab1e40 !important;
    }
    
    .ocl-qty-btn:hover {
        background: #ab1e40 !important;
    }
    
    .ocl-form-row label .required {
        color: #ab1e40 !important;
    }
    
    .ocl-form-row input:focus {
        border-color: #ab1e40 !important;
    }
    
    .ocl-submit-btn {
        background: #ab1e40 !important;
    }
    
    .ocl-submit-btn:hover {
        background: #8a1833 !important;
    }
    
    .ocl-form-buttons {
        flex-direction: column;
    }
    
    .ocl-cancel-btn {
        order: 2;
    }
}

