/* ==========================================================================
   Adventi Popup - Clean Design
   ========================================================================== */

:root {
    --advent-primary: #04A58C;
    --advent-primary-dark: #038573;
    --advent-primary-darker: #026B5E;
    --advent-gold: #E9D8A6;
    --advent-red: #AE2012;
    --advent-red-dark: #8B1A0E;
    --advent-white: #FFFFFF;
}

/* Overlay */
.advent-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

/* Snow Canvas */
#advent-snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999997;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#advent-snow-canvas.active {
    opacity: 1;
}

/* Popup Container */
.advent-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 420px;
    background: linear-gradient(180deg, #04A58C 0%, #026B5E 100%);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.advent-popup-container.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.advent-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    padding: 0;
}

.advent-popup-close:hover {
    background: #fff;
    color: var(--advent-primary);
    border-color: #fff;
}

/* Header */
.advent-popup-header {
    padding: 25px 25px 15px;
    text-align: center;
}

.advent-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

.advent-popup-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.advent-week-badge {
    display: inline-block;
    background: var(--advent-red);
    color: #fff;
    padding: 5px 14px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

/* Content */
.advent-popup-content {
    padding: 0 25px 25px;
}

/* ==========================================================================
   Pure CSS Gift Box - Ultra Simple
   ========================================================================== */

.advent-gift-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 0 10px;
}

.advent-gift-box {
    position: relative;
}

/* Bow loops */
.advent-gift-lid {
    position: relative;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.advent-gift-lid::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: calc(50% - 30px);
    width: 26px;
    height: 22px;
    background: #D4B896;
    border-radius: 50% 50% 0 50%;
    transform: rotate(-10deg);
}

.advent-gift-lid::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: calc(50% - 30px);
    width: 26px;
    height: 22px;
    background: #D4B896;
    border-radius: 50% 50% 50% 0;
    transform: rotate(10deg);
}

/* Bow center */
.advent-lid-bow {
    width: 20px;
    height: 20px;
    background: #C4A35A;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

/* Gift Box Body */
.advent-gift-body {
    width: 160px;
    height: 110px;
    background: #AE2012;
    border-radius: 8px;
    position: relative;
    margin-top: -5px;
}

/* Vertical ribbon */
.advent-ribbon-v {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 100%;
    background: #D4B896;
}

/* Horizontal ribbon */
.advent-ribbon-h {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 26px;
    background: #D4B896;
}

/* ==========================================================================
   Gift Info - Below the box
   ========================================================================== */

.advent-gift-info {
    text-align: center;
    margin: 15px 0;
}

.advent-gift-category {
    font-size: 22px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 10px;
}

.advent-gift-discount {
    display: inline-block;
    background: #E9D8A6;
    color: #8B1A0E;
    padding: 8px 22px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
}

.advent-cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    margin: 15px 0;
}

/* ==========================================================================
   Form
   ========================================================================== */

.advent-popup-form {
    margin-top: 10px;
}

.advent-form-group {
    margin-bottom: 10px;
}

.advent-form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.advent-form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.advent-form-input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.advent-submit-btn {
    width: 100%;
    padding: 14px;
    background: #038573;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.advent-submit-btn:hover {
    background: #026B5E;
    transform: translateY(-2px);
}

.advent-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Terms */
.advent-terms {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

.advent-terms strong {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Success & Error States
   ========================================================================== */

.advent-success-message {
    text-align: center;
    padding: 20px 0;
    display: none;
}

.advent-success-message.show {
    display: block;
}

.advent-success-title {
    font-size: 20px;
    color: #fff;
    margin: 0 0 10px;
}

.advent-success-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.advent-error-message {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    display: none;
}

.advent-error-message.show {
    display: block;
}

/* Loading */
.advent-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .advent-popup-container {
        width: 94%;
        border-radius: 16px;
    }

    .advent-popup-header {
        padding: 20px 20px 12px;
    }

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

    .advent-popup-content {
        padding: 0 20px 20px;
    }

    .advent-gift-box {
        width: 100px;
    }

    .advent-gift-lid {
        width: 110px;
        height: 22px;
    }

    .advent-gift-body {
        width: 100px;
        height: 75px;
    }

    .advent-gift-category {
        font-size: 18px;
    }
}
