/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modal Base Structure */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.newsletter-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.newsletter-modal.active .modal-overlay {
    opacity: 1;
}

/* Modal Container */
.modal-container {
    position: relative;
    width: 90%;
    max-width: 520px;
    margin: 20px;
    z-index: 1;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.newsletter-modal.active .modal-container {
    transform: translateY(0);
}

/* Modal Content */
.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Close Button */
.close-button {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
}

.close-button:hover {
    color: #333;
    background: #f5f5f5;
    transform: rotate(90deg);
}

.close-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2px;
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    /* background: #FF3366; */
    background: #3C3E4B;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    /* box-shadow: 0 4px 12px rgba(255, 51, 102, 0.2); */
    box-shadow: 0 4px 12px #3c3e4b71;
    z-index: 1;
}

.discount-badge span {
    position: relative;
    display: inline-block;
}

/* Content Section */
.content-section {
    text-align: center;
    margin-top: 1rem;
}

.title {
    font-size: 1.75rem;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

/* Newsletter Form */
.newsletter-form {
    margin-bottom: 1.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    /* width: 100%; */
    width: 50%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #f8f8f8;
    height: 54px;
}

.input-group input::placeholder {
    color: transparent;
}

.input-group input:focus {
    outline: none;
    /* border-color: #FF3366; */
    border-color: #3C3E4B;
    background: white;
    /* box-shadow: 0 0 0 4px rgba(255, 51, 102, 0.1); */
    box-shadow: 0 4px 12px #3c3e4b71;
}

.input-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: all 0.2s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 0.25rem;
}

.input-group input:focus + .input-label,
.input-group input:not(:placeholder-shown) + .input-label {
    top: 0;
    font-size: 0.75rem;
    background: white;
    padding: 0 0.5rem;
    /* color: #FF3366; */
    color: #3C3E4B;
    transform: translateY(-50%);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 1rem;
    /* background: #FF3366; */
    background: #3C3E4B !important;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.submit-button:hover {
    /* background: #ff1f57; */
    background: #3C3E4B;
    transform: translateY(-1px);
    /* box-shadow: 0 4px 12px rgba(255, 51, 102, 0.2); */
    box-shadow: 0 4px 12px #3c3e4b71;
}

.submit-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Checkbox Styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e1e1;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    background: white;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    /* background: #FF3366; */
    background: #3C3E4B;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    /* border-color: #FF3366; */
    border-color: #3C3E4B;
    /* background: #FF3366; */
    background-color: #3C3E4B;
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    transform: translate(-50%, -50%) scale(1);
    background: white;
}

.checkbox-wrapper:hover .checkbox-custom {
    /* border-color: #FF3366; */
    border-color: #3C3E4B;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #666;
}

/* Terms Text */
.terms-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 1.5rem;
    padding: 0 1rem;
    line-height: 1.6;
}

/* Form Footer */
.form-footer {
    margin-top: 1rem;
}

/* Loading State */
.submit-button.loading {
    /* background: #ff4d7d; */
    background: #3c3e4bee;
    pointer-events: none;
}

.submit-button.loading span {
    opacity: 0;
}

.submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success State */
.submit-button.success {
    background: #22c55e;
    pointer-events: none;
}

/* Error State */
.input-group.error input {
    border-color: #dc2626;
    background: #fef2f2;
}

.input-group.error .input-label {
    color: #dc2626;
}

.error-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: left;
    display: none;
}

.input-group.error .error-message {
    display: block;
}

/* Responsive Design */
@media (max-width: 480px) {
    .modal-content {
        padding: 2rem 1.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .description {
        font-size: 0.875rem;
        padding: 0;
    }

    .discount-badge {
        font-size: 0.8125rem;
        padding: 0.4rem 1.25rem;
    }

    .input-group input,
    .submit-button {
        height: 48px;
    }
}

/* Animation Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Focus Visible Polyfill */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

.js-focus-visible .focus-visible {
    outline: none;
    /* box-shadow: 0 0 0 3px rgba(255, 51, 102, 0.5); */
    box-shadow: 0 4px 12px #3c3e4b71;
}


/* /////////////////////////////////////////////////////////////////// */

.a-content{
    color: #ffffff;
    font-size: 1.25rem;
}

@media (max-width: 480px){
    .a-content{
        color: #ffffff;
        font-size: 12px;
    }
}