/**
 * KB Abandoned Cart Pro - Frontend CSS
 *
 * @author suspended.starter
 * @copyright 2024
 * @license Commercial
 */

/* Popup Container */
.kbacp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.kbacp-popup {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.kbacp-popup-overlay.active .kbacp-popup {
    transform: scale(1);
}

.kbacp-popup-header {
    padding: 20px;
    text-align: center;
    position: relative;
}

.kbacp-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    line-height: 30px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.kbacp-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

.kbacp-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.kbacp-popup-body {
    padding: 0 20px 20px;
}

.kbacp-popup-content {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.kbacp-popup-products {
    margin-bottom: 20px;
}

.kbacp-popup-product {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.kbacp-popup-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.kbacp-popup-product-info {
    flex: 1;
}

.kbacp-popup-product-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.kbacp-popup-product-price {
    color: #25b9d7;
    font-weight: 700;
}

.kbacp-popup-coupon {
    background: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
}

.kbacp-popup-coupon-code {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #856404;
    font-family: monospace;
}

.kbacp-popup-countdown {
    text-align: center;
    margin-bottom: 20px;
}

.kbacp-popup-countdown-value {
    font-size: 32px;
    font-weight: 700;
    color: #dc3545;
}

.kbacp-popup-cta {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #25b9d7;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease;
}

.kbacp-popup-cta:hover {
    background: #1a8fa8;
    color: #fff;
    text-decoration: none;
}

.kbacp-popup-footer {
    padding: 15px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.kbacp-popup-skip {
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.kbacp-popup-skip:hover {
    color: #333;
}

/* Highlight Bar */
.kbacp-highlight-bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 99998;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.kbacp-highlight-bar.top {
    top: 0;
}

.kbacp-highlight-bar.bottom {
    bottom: 0;
    transform: translateY(100%);
}

.kbacp-highlight-bar.active {
    transform: translateY(0);
}

.kbacp-highlight-bar-content {
    font-size: 14px;
    font-weight: 500;
}

.kbacp-highlight-bar-cta {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.kbacp-highlight-bar-cta:hover {
    opacity: 0.9;
    text-decoration: none;
}

.kbacp-highlight-bar-close {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.kbacp-highlight-bar-close:hover {
    opacity: 1;
}

.kbacp-highlight-bar-countdown {
    font-weight: 700;
    font-size: 16px;
}

/* Lead Form */
.kbacp-lead-form {
    max-width: 400px;
    width: 90%;
}

.kbacp-lead-form .form-group {
    margin-bottom: 15px;
}

.kbacp-lead-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.kbacp-lead-form input[type="text"],
.kbacp-lead-form input[type="email"],
.kbacp-lead-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.kbacp-lead-form input[type="text"]:focus,
.kbacp-lead-form input[type="email"]:focus,
.kbacp-lead-form textarea:focus {
    border-color: #25b9d7;
    outline: none;
}

.kbacp-lead-form-submit {
    width: 100%;
    padding: 15px;
    background: #25b9d7;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.kbacp-lead-form-submit:hover {
    background: #1a8fa8;
}

.kbacp-lead-form-success {
    text-align: center;
    padding: 40px 20px;
}

.kbacp-lead-form-success i {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 20px;
}

.kbacp-lead-form-success h3 {
    color: #333;
    margin-bottom: 10px;
}

/* Animation Classes */
@keyframes kbacp-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes kbacp-slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes kbacp-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.kbacp-animate-fadeIn {
    animation: kbacp-fadeIn 0.3s ease;
}

.kbacp-animate-slideDown {
    animation: kbacp-slideDown 0.3s ease;
}

.kbacp-animate-pulse {
    animation: kbacp-pulse 2s infinite;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .kbacp-popup {
        width: 95%;
        margin: 10px;
    }

    .kbacp-popup-title {
        font-size: 20px;
    }

    .kbacp-highlight-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .kbacp-highlight-bar-close {
        position: static;
        order: -1;
        align-self: flex-end;
    }
}
