/**
 * 4Square Rewards WooCommerce Plugin Styles
 * Based on mockup designs from examples folder
 */

/* Override WooCommerce payment_box wrapper - Match WooCommerce's exact specificity */
.woocommerce-checkout #payment div.payment_box.payment_method_foursquare,
.woocommerce-cart #payment div.payment_box.payment_method_foursquare,
#add_payment_method #payment div.payment_box.payment_method_foursquare {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 20px !important;
    margin: 0 !important;
    margin-top: -1px !important; /* Overlap with label border */
    border: 1px solid rgba(40, 167, 69, 0.15) !important;
    box-shadow: none !important;
    border-radius: 0 0 3px 3px !important;
    color: inherit !important;
    position: relative !important;
}

/* Style the arrow to match the green border - positioned outside */
.woocommerce-checkout #payment div.payment_box.payment_method_foursquare::before,
.woocommerce-cart #payment div.payment_box.payment_method_foursquare::before,
#add_payment_method #payment div.payment_box.payment_method_foursquare::before {
    content: "" !important;
    display: block !important;
    border: 1em solid transparent !important;
    border-bottom-color: rgba(40, 167, 69, 0.15) !important;
    position: absolute !important;
    top: -2em !important;
    left: 2em !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Inner arrow for white fill effect - positioned to create outline */
.woocommerce-checkout #payment div.payment_box.payment_method_foursquare::after,
.woocommerce-cart #payment div.payment_box.payment_method_foursquare::after,
#add_payment_method #payment div.payment_box.payment_method_foursquare::after {
    content: "" !important;
    display: block !important;
    border: 1em solid transparent !important;
    border-bottom-color: #ffffff !important;
    position: absolute !important;
    top: -1.98em !important;
    left: 2em !important;
    margin: 0 !important;
    width: 0 !important;
    height: 0 !important;
    z-index: 1 !important;
}

/* Payment Method Selection */
.wc_payment_method.payment_method_foursquare {
    display: flex;
    align-items: stretch;
}

.wc_payment_method.payment_method_foursquare > .input-radio {
    margin: 0 12px 0 0 !important;
    align-self: center;
}

.payment_method_foursquare label {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
    cursor: pointer;
    background: #f8f8f8 !important;
    border: 1px solid rgba(40, 167, 69, 0.15) !important;
    border-bottom: none !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    border-radius: 3px 3px 0 0 !important;
}

.payment_method_foursquare label .fsq-gateway-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payment_method_foursquare label .fsq-gateway-icon {
    margin-right: 0;
    margin-left: 0;
}

@media (max-width: 520px) {
    .payment_method_foursquare label {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .payment_method_foursquare label .fsq-gateway-icons {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Constrain payment method radio icon size */
.payment_method_foursquare > label img {
    max-width: 24px !important;
    max-height: 24px !important;
    width: auto !important;
    height: auto !important;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
}


.payment_method_foursquare .fsq-logo {
    width: 80px;
    height: auto;
}

/* 4Square Payment Method Box */
.payment-method-4square {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.payment-method-4square.selected {
    background: transparent;
}

.payment-method-4square .points-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.payment-method-4square .points-balance {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.payment-method-4square .points-balance .amount {
    color: #28a745;
    font-size: 24px;
}

/* Login Required Notice */
.fsq-login-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.fsq-login-notice a {
    color: #533f03;
    font-weight: 600;
    text-decoration: underline;
}

/* Insufficient Points Notice */
.fsq-insufficient-points {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.fsq-insufficient-points .deficit {
    font-weight: 600;
    font-size: 16px;
}

/* Modals */
.fsq-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.fsq-modal {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    max-width: 480px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow: auto !important;
    transform: scale(0.9) !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.fsq-modal-overlay.active .fsq-modal {
    transform: scale(1);
}

.fsq-modal-header {
    padding: 24px 24px 0;
    border-bottom: 1px solid #e9ecef;
}

.fsq-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.fsq-modal-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 16px 0;
}

.fsq-modal-body {
    padding: 24px;
}

.fsq-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Modal Styles */
.fsq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fsq-modal.fsq-modal-active {
    opacity: 1;
    visibility: visible;
}

.fsq-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.fsq-modal-dialog {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.fsq-modal-active .fsq-modal-dialog {
    transform: scale(1);
}

.fsq-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.fsq-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.fsq-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.fsq-modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.fsq-modal-content {
    padding: 24px;
}

.fsq-modal-content p {
    margin: 0 0 16px;
    color: #495057;
    line-height: 1.6;
}

.fsq-modal-content a {
    color: #28a745;
    text-decoration: none;
    font-weight: 500;
}

.fsq-modal-content a:hover {
    text-decoration: underline;
}

.fsq-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.fsq-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fsq-modal-btn[data-action="confirm_redeem"] {
    background: #28a745;
    color: white;
}

.fsq-modal-btn[data-action="confirm_redeem"]:hover {
    background: #218838;
}

.fsq-modal-btn[data-action="close"] {
    background: #6c757d;
    color: white;
}

.fsq-modal-btn[data-action="close"]:hover {
    background: #5a6268;
}

.fsq-modal-btn[data-action="callback"] {
    background: #28a745;
    color: white;
}

/* Card icons and checkout message styling */
.fsq-payment-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin: 25px 0 15px;
    padding: 15px 0;
}

.fsq-checkout-logo {
    width: 72px;
    max-width: 100%;
}

.fsq-card-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

/* Card icons styling - updated for SVG */
.fsq-card-icons .fsq-card-icon {
    width: 52px;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
    border-radius: 4px;
    background: white;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.fsq-card-icons .fsq-card-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18), 0 3px 5px rgba(0, 0, 0, 0.26);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.fsq-checkout-message {
    font-size: 18px;
    color: #444;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Non-authenticated user layout */
.payment_box.fsq-not-authenticated .points-info,
.fsq-not-authenticated .payment_box .points-info {
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 20px;
}

.payment_box.fsq-not-authenticated .points-usage-container,
.fsq-not-authenticated .payment_box .points-usage-container {
    display: inline-flex;
    align-items: center;
    background: rgba(40, 167, 69, 0.06);
    padding: 5px 14px;
    border-radius: 25px;
    border: 1px solid rgba(40, 167, 69, 0.15);
    margin: 0 auto;
    gap: 6px;
}

.payment_box.fsq-not-authenticated .points-label,
.fsq-not-authenticated .payment_box .points-label {
    color: #999;
    font-size: 11px;
    font-weight: 400;
    margin: 0;
}

.payment_box.fsq-not-authenticated .points-usage,
.fsq-not-authenticated .payment_box .points-usage {
    color: #28a745;
    font-size: 11px;
    font-weight: 500;
    margin: 0;
}


.fsq-modal-btn[data-action="callback"]:hover {
    background: #218838;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .fsq-modal-dialog {
        width: 95%;
        margin: 10px;
    }
    
    .fsq-modal-header {
        padding: 16px 20px;
    }
    
    .fsq-modal-content {
        padding: 20px;
    }
    
    .fsq-modal-footer {
        padding: 16px 20px;
    }
}

/* Legacy Modal Overlay Styles (for backward compatibility) */
.fsq-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Success Modal */
.fsq-success-modal {
    text-align: center;
    position: relative;
}

.fsq-success-modal .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 1s ease-in-out;
}

.fsq-success-modal .success-icon svg {
    width: 50px;
    height: 50px;
    fill: white;
}

@keyframes successPulse {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.fsq-success-modal .points-redeemed {
    font-size: 36px;
    font-weight: 700;
    color: #28a745;
    margin: 20px 0;
}

.fsq-success-modal .new-balance {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 20px;
}

.fsq-success-modal .countdown-redirect {
    font-size: 14px;
    color: #6c757d;
    margin-top: 30px;
}

.fsq-success-modal .countdown-redirect .seconds {
    font-weight: 600;
    color: #333;
}

/* Confetti Canvas */
#fsq-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Login Modal */
.fsq-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fsq-login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fsq-login-form label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.fsq-login-form input {
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.fsq-login-form input:focus {
    outline: none;
    border-color: #28a745;
}

/* Buy Points Modal */
.fsq-buy-points-modal .points-package {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fsq-buy-points-modal .points-package:hover {
    border-color: #28a745;
    background: #f0f9f0;
}

.fsq-buy-points-modal .points-package.selected {
    border-color: #28a745;
    background: #e8f5e8;
}

.fsq-buy-points-modal .package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fsq-buy-points-modal .package-points {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.fsq-buy-points-modal .package-price {
    font-size: 20px;
    font-weight: 600;
    color: #28a745;
}

.fsq-buy-points-modal .package-savings {
    font-size: 14px;
    color: #dc3545;
    font-weight: 600;
}

/* Buttons */
.fsq-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.fsq-btn-primary {
    background: #28a745;
    color: white;
}

.fsq-btn-primary:hover {
    background: #218838;
}

.fsq-btn-secondary {
    background: #6c757d;
    color: white;
}

.fsq-btn-secondary:hover {
    background: #5a6268;
}

.fsq-btn-outline {
    background: white;
    color: #333;
    border: 2px solid #e9ecef;
}

.fsq-btn-outline:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Loading States */
.fsq-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #28a745;
    border-radius: 50%;
    animation: fsqSpin 1s linear infinite;
}

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

.fsq-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Error Messages */
.fsq-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fsq-error-message svg {
    width: 20px;
    height: 20px;
    fill: #721c24;
    flex-shrink: 0;
}

/* Modal Styles */
.fsq-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.fsq-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.fsq-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.fsq-modal-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fsq-modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fsq-modal-header i {
    color: #4CAF50;
}

.fsq-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.fsq-modal-close:hover {
    opacity: 1;
}

.fsq-modal-body {
    padding: 30px;
}

.welcome-message {
    text-align: center;
}

.welcome-message p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #333;
}

.points-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.points-icon {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    box-shadow: 0 3px 10px rgba(255, 183, 0, 0.3);
}

.points-info {
    flex: 1;
}

.points-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.points-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #007cba;
}

.fsq-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.fsq-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.fsq-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004066 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.fsq-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
}

/* Welcome Modal Specific Styles */
.fsq-welcome-modal .fsq-modal-content {
    border: 2px solid #4CAF50;
}

.fsq-welcome-modal .fsq-modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.fsq-welcome-modal .fsq-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.fsq-welcome-modal .fsq-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .fsq-modal-content {
        width: 95%;
        margin: 10px;
        max-width: none;
    }
    
    .fsq-modal-body {
        padding: 20px;
    }
    
    .fsq-modal-footer {
        padding: 15px 20px;
    }
    
    .payment-method-4square .points-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .points-display {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .fsq-btn {
        width: 100%;
        text-align: center;
    }
}

/* Welcome Modal Styles */
.fsq-welcome-modal {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    text-align: center !important;
    max-width: 400px !important;
    width: 90% !important;
    max-height: 90vh !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin: auto !important;
    transform: scale(1) !important;
    transition: transform 0.3s ease !important;
}

.fsq-welcome-modal .fsq-modal-header {
    border-bottom: none !important;
    background: transparent !important;
    color: white !important;
    text-align: center !important;
    padding: 24px 24px 0 !important;
}

.fsq-welcome-modal .fsq-modal-header h3 {
    color: white !important;
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

.fsq-welcome-modal .fsq-modal-header h3 i {
    color: #fff;
    margin-right: 8px;
}

.fsq-welcome-modal .fsq-close-x {
    color: white !important;
    opacity: 0.8 !important;
    font-size: 20px !important;
    position: absolute !important;
    right: 15px !important;
    top: 15px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 10 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.fsq-welcome-modal .fsq-close-x:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1) !important;
}

.fsq-welcome-modal .welcome-message {
    padding: 20px 0;
}

.fsq-welcome-modal .welcome-message p {
    font-size: 16px !important;
    margin-bottom: 20px !important;
    opacity: 0.95 !important;
    color: white !important;
}

.fsq-welcome-modal .points-display {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.fsq-welcome-modal .points-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.fsq-welcome-modal .points-info {
    flex: 1;
    text-align: left;
}

.fsq-welcome-modal .points-label {
    font-size: 14px !important;
    opacity: 0.8 !important;
    margin-bottom: 4px !important;
    color: white !important;
}

.fsq-welcome-modal .points-value {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.fsq-welcome-modal .fsq-modal-footer {
    background: transparent;
    border-top: none;
    padding: 20px;
}

.fsq-welcome-modal .fsq-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #28a745 !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-align: center !important;
    width: auto !important;
}

.fsq-welcome-modal .fsq-btn:hover {
    background: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Success Modal Styles */
.fsq-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fsq-success-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fsqSuccessModalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fsqSuccessModalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Success Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalFade 0.3s ease-in-out;
}

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

.modal-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.modal-logo {
    max-height: 40px;
    display: block;
    margin: 0 auto 15px;
}

.modal-title {
    color: #2ecc71;
    margin-bottom: 10px;
}

.modal-subtitle {
    color: #666;
    font-size: 14px;
}

.modal-body {
    padding: 25px 20px;
}

.points-summary {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.points-label {
    color: #666;
}

.points-value {
    font-weight: 500;
}

.points-new-balance {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 18px;
    font-weight: bold;
    color: #2ecc71;
}

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

#countdown {
    font-weight: bold;
    color: #e67e22;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
}

.back-to-merchant {
    background-color: #D35400;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.back-to-merchant:hover {
    background-color: #A04000;
}

/* Animation for fadeIn effect */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out forwards;
}

.hidden-value {
    opacity: 0;
}

/* Confetti Canvas */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1999;
    pointer-events: none;
}

/* Animation effects */
@keyframes fsqCountUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.fsq-animate-value {
    animation: fsqCountUp 0.15s ease;
}
