/* RVS Popup Overlay */
.rvs-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: rvsPopupFadeIn 0.3s ease-out;
}

.rvs-popup-container {
    background: #fff;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: rvsPopupSlideIn 0.3s ease-out;
}

.rvs-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rvs-popup-close:hover {
    background: #f44336;
    color: #fff;
    transform: rotate(90deg);
}

.rvs-popup-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Loading State */
.rvs-popup-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.rvs-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: rvsSpinAnimation 1s linear infinite;
}

.rvs-popup-loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
}

/* Default Template - Side by Side */
.rvs-popup-template-default {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 0;
    min-height: 500px;
}

.rvs-popup-left {
    background: #f8f9fa;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rvs-popup-product-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.rvs-popup-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.rvs-popup-product-info h2 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.rvs-popup-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
    margin: 10px 0;
}

.rvs-popup-product-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.rvs-popup-right {
    padding: 40px;
    overflow-y: auto;
    max-height: 90vh;
}

/* Compact Template */
.rvs-popup-template-compact {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
}

.rvs-popup-template-compact .rvs-popup-product-image {
    max-width: 300px;
    margin: 0 auto 30px;
}

/* Full Width Template */
.rvs-popup-template-fullwidth {
    padding: 40px;
}

.rvs-popup-template-fullwidth .rvs-popup-product-image {
    max-width: 100%;
    margin-bottom: 30px;
}

/* Multi-Step Template */
.rvs-popup-template-multi-step {
    padding: 0;
}

.rvs-step-progress {
    background: #f8f9fa;
    padding: 20px 40px;
    border-bottom: 1px solid #e5e5e5;
}

.rvs-progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.rvs-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4299e1);
    width: 0%;
    transition: width 0.3s ease;
}

.rvs-progress-text {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.rvs-step-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.rvs-step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #999;
    transition: all 0.3s;
}

.rvs-step-indicator.active {
    background: #2271b1;
    color: #fff;
    transform: scale(1.1);
}

.rvs-step-indicator.completed {
    background: #46b450;
    color: #fff;
}

.rvs-steps-container {
    padding: 40px;
}

.rvs-step {
    display: none;
}

.rvs-step.active {
    display: block;
    animation: rvsStepFadeIn 0.3s ease-out;
}

.rvs-step h3 {
    font-size: 22px;
    margin: 0 0 20px 0;
    color: #333;
}

.rvs-step-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: space-between;
}

.rvs-step-prev,
.rvs-step-next {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.rvs-step-prev {
    background: #f1f1f1;
    color: #333;
}

.rvs-step-prev:hover {
    background: #e0e0e0;
}

.rvs-step-next {
    background: #2271b1;
    color: #fff;
}

.rvs-step-next:hover {
    background: #1a5a8a;
}

/* Form Fields */
.rvs-form-field {
    margin-bottom: 25px;
}

.rvs-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.rvs-form-field input[type="text"],
.rvs-form-field input[type="email"],
.rvs-form-field input[type="tel"],
.rvs-form-field input[type="number"],
.rvs-form-field input[type="date"],
.rvs-form-field input[type="time"],
.rvs-form-field textarea,
.rvs-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.rvs-form-field input:focus,
.rvs-form-field textarea:focus,
.rvs-form-field select:focus {
    border-color: #2271b1;
    outline: none;
}

.rvs-form-field input.error,
.rvs-form-field textarea.error,
.rvs-form-field select.error {
    border-color: #f44336;
}

.rvs-form-field textarea {
    min-height: 100px;
    resize: vertical;
}

.rvs-form-field .field-description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Radio and Checkbox Options */
.rvs-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rvs-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.rvs-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.rvs-option input[type="radio"],
.rvs-option input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.rvs-option-label {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.rvs-option-price {
    font-weight: 700;
    color: #2271b1;
    margin-left: 10px;
}

.rvs-option input:checked ~ .rvs-option-content {
    font-weight: 600;
}

/* Quantity Controls */
.rvs-quantity-group {
    margin: 20px 0;
}

.rvs-quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rvs-qty-minus,
.rvs-qty-plus {
    width: 40px;
    height: 40px;
    border: 2px solid #e5e5e5;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.rvs-qty-minus:hover,
.rvs-qty-plus:hover {
    border-color: #2271b1;
    background: #f0f6fc;
    color: #2271b1;
}

.rvs-qty-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

/* Total Price Display */
.rvs-price-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.rvs-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.rvs-price-row.total {
    border-top: 2px solid #e5e5e5;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 20px;
    font-weight: 700;
}

.rvs-total-price {
    color: #2271b1;
}

/* Add to Cart Button */
.rvs-popup-add-to-cart {
    width: 100%;
    padding: 16px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.rvs-popup-add-to-cart:hover {
    background: #1a5a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.rvs-popup-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.rvs-popup-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: rvsMessageSlideDown 0.3s ease-out;
}

.rvs-popup-error {
    background: #fef0f0;
    color: #dc3232;
    border-left: 4px solid #dc3232;
}

.rvs-popup-success {
    background: #f0f9f4;
    color: #46b450;
    border-left: 4px solid #46b450;
}

/* Animations */
@keyframes rvsPopupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes rvsPopupSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rvsSpinAnimation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes rvsStepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rvsMessageSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .rvs-popup-template-default {
        grid-template-columns: 1fr;
    }

    .rvs-popup-left {
        padding: 30px;
    }

    .rvs-popup-right {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .rvs-popup-container {
        margin: 20px;
        max-height: 95vh;
    }

    .rvs-popup-left,
    .rvs-popup-right,
    .rvs-steps-container {
        padding: 20px;
    }

    .rvs-popup-product-info h2 {
        font-size: 20px;
    }

    .rvs-popup-product-price {
        font-size: 24px;
    }

    .rvs-step-navigation {
        flex-direction: column;
    }

    .rvs-step-prev,
    .rvs-step-next {
        width: 100%;
    }
}

/* Scrollbar Styling */
.rvs-popup-content::-webkit-scrollbar,
.rvs-popup-right::-webkit-scrollbar {
    width: 8px;
}

.rvs-popup-content::-webkit-scrollbar-track,
.rvs-popup-right::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.rvs-popup-content::-webkit-scrollbar-thumb,
.rvs-popup-right::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.rvs-popup-content::-webkit-scrollbar-thumb:hover,
.rvs-popup-right::-webkit-scrollbar-thumb:hover {
    background: #555;
}
