/* Mailing List Popup Styles */

.maillist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(4px);
    animation: maillistOverlayFadeIn 0.3s ease-out;
}

@keyframes maillistOverlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.maillist-popup {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.maillist-popup-enter {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.maillist-popup-exit {
    transform: scale(0.9) translateY(20px);
    opacity: 0;
}

.maillist-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.maillist-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

.maillist-content {
    padding: 48px 40px 40px;
}

.maillist-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.maillist-icon svg {
    animation: maillistIconBounce 0.6s ease-out 0.3s;
}

@keyframes maillistIconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.maillist-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.maillist-description {
    text-align: center;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
    font-size: 15px;
}

.maillist-form {
    margin-bottom: 20px;
}

.maillist-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.maillist-form-group {
    margin-bottom: 16px;
}

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

.maillist-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #fafafa;
}

.maillist-input:focus {
    outline: none;
    border-color: #ff813f;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 129, 63, 0.1);
}

.maillist-input:hover:not(:focus) {
    border-color: #c0c0c0;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 78px;
}

.maillist-error {
    display: none;
    background: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    border-left: 4px solid #c33;
}

.maillist-success {
    display: none;
    background: #efe;
    color: #2a6;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    border-left: 4px solid #2a6;
}

.maillist-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ff813f 0%, #ff6220 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 129, 63, 0.3);
}

.maillist-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 129, 63, 0.4);
    background: linear-gradient(135deg, #ff6220 0%, #ff813f 100%);
}

.maillist-submit:active:not(:disabled) {
    transform: translateY(0);
}

.maillist-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.maillist-spinner {
    animation: maillistSpin 1s linear infinite;
}

.maillist-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: maillistDash 1.5s ease-in-out infinite;
}

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

@keyframes maillistDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.maillist-privacy {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* Responsive styles */
@media (max-width: 600px) {
    .maillist-content {
        padding: 40px 24px 24px;
    }

    .maillist-title {
        font-size: 24px;
    }

    .maillist-description {
        font-size: 14px;
    }

    .maillist-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .maillist-popup {
        margin: 20px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .maillist-popup {
        background: #2a2a2a;
    }

    .maillist-title {
        color: #ffffff;
    }

    .maillist-description {
        color: #b0b0b0;
    }

    .maillist-label {
        color: #e0e0e0;
    }

    .maillist-input {
        background: #1a1a1a;
        border-color: #404040;
        color: #ffffff;
    }

    .maillist-input:focus {
        background: #2a2a2a;
        border-color: #ff813f;
    }

    .maillist-close {
        color: #b0b0b0;
    }

    .maillist-close:hover {
        background: #3a3a3a;
        color: #ffffff;
    }
}
