/* Popup Subscription Styles - Matching Scrapbook Sticky Note Style */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #2EC4B6;
    padding: 1.5rem;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.15);
    transform: rotate(1deg) scale(0.7) translateY(-20px);
    transition: all 0.3s ease;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    color: white;
}

.popup-overlay.active .popup-content {
    transform: rotate(1deg) scale(1) translateY(0);
}

.popup-content:hover {
    transform: rotate(-1deg) translateY(-5px);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
}

/* Tape effect at the top */
.popup-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 20px;
    background-color: rgba(0,0,0,0.1);
    clip-path: polygon(0% 100%, 100% 100%, 100% 0%, 0% 0%);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
    padding: 5px;
    line-height: 1;
    transition: all 0.2s ease;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.popup-header {
    text-align: center;
    margin-bottom: 25px;
}

.popup-title {
    font-family: 'Pacifico', cursive;
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    line-height: 1.2;
}

.popup-subtitle {
    font-family: 'Shadows Into Light', cursive;
    font-size: 20px;
    color: white;
    margin-bottom: 0;
    line-height: 1.4;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popup-input {
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    transition: all 0.2s ease;
    font-family: 'Patrick Hand', cursive;
}

.popup-input::placeholder {
    color: #9ca3af;
    font-family: 'Patrick Hand', cursive;
}

.popup-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.popup-input.error {
    background: #fdf2f2;
    box-shadow: 0 0 0 2px #e74c3c;
}

.popup-submit {
    background: white;
    color: #2EC4B6;
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Gloria Hallelujah', cursive;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 10px;
}

.popup-submit:hover {
    background: #f8f8f8;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.popup-submit:active {
    transform: translateY(-1px);
}

.popup-submit:disabled {
    background: rgba(255, 255, 255, 0.6);
    color: rgba(46, 196, 182, 0.7);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.popup-message {
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    display: none;
    font-family: 'Patrick Hand', cursive;
}

.popup-message.success {
    background-color: rgba(255, 255, 255, 0.9);
    color: #2EC4B6;
    font-weight: bold;
}

.popup-message.error {
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
}



/* Loading state */
.popup-loading {
    position: relative;
    color: transparent !important;
}

.popup-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(46, 196, 182, 0.3);
    border-top: 3px solid #2EC4B6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .popup-content {
        padding: 30px 25px;
        margin: 20px;
        border-radius: 15px;
        max-width: 90%;
    }

    .popup-title {
        font-size: 28px;
    }

    .popup-subtitle {
        font-size: 16px;
    }

    .popup-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .popup-submit {
        padding: 12px 25px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 25px 20px;
        margin: 15px;
    }

    .popup-title {
        font-size: 24px;
    }

    .popup-subtitle {
        font-size: 14px;
    }
}