@import '../IndexStyle.css';

body.newsletter-popup-open {
    overflow: hidden;
}

.newsletter-popup-container {
    font-family: var(--main-font);
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.newsletter-popup {
    position: relative;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    max-width: 800px;
    width: 90%;
    padding: 20px;
    overflow: hidden;
    overflow-y: auto;
}
.newsletter-popup-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.newsletter-popup-image img{
    width: 100%;
    height: auto;
    max-height: 350px;
    width: auto;
}
.newsletter-popup-content {
    flex: 1;
    padding: 30px;
    text-align: left;
}
.newsletter-popup h2 {
    margin-top: 0;
    color: #333;
}
.newsletter-popup p {
    color: #444;
    margin: 5% 0;
}
.newsletter-input-container {
    position: relative;
    margin-bottom: 10px;
}
.newsletter-input-container img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: auto;
}
.newsletter-email-input {
    outline: none;
    font-family: var(--main-font);
    width: 100%;
    padding: 12px 12px 12px 45px;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
    background-color: var(--primary-color-light-10);
    color: whitesmoke;
    font-weight: 500;
}
.newsletter-email-input::placeholder {
    font-family: var(--main-font);
    color: whitesmoke;
    font-weight: 500;
}
.newsletter-status-message {
    color: #d9534f;
    margin: 5px 0;
    display: none;
}
.newsletter-submit-button {
    font-family: var(--main-font);
    font-weight: 500;
    background-color: var(--secondary-color);
    margin: 2% 0;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.15 ease-out;
}
.newsletter-popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
}


@media (max-width: 800px) {
    .newsletter-popup {
        flex-direction: column;
        max-width: 90%;
        padding: 0 20px;
        padding-top: 20px;
        border-radius: 12px;
    }
    .newsletter-popup-content {
        padding: 20px 0;
    }
    .newsletter-popup-image img{
        width: 50%;
        height: auto;
        max-height: none;
    }
    .newsletter-popup p {
        color: #444;
        margin: 3.5% 0;
    }
    .newsletter-input-container img {
        width: 30px;
        height: auto;
    }
    .newsletter-email-input {
        padding: 12px 12px 12px 50px;
        border-radius: 4px;
        box-sizing: border-box;
        background-color: var(--primary-color-light-10);
        color: whitesmoke;
        font-weight: 500;
    }
    .newsletter-submit-button{
        margin-bottom: 0;
    }
}

@media (max-width: 500px){
    .newsletter-popup {
        padding: 0 15px;
        padding-top: 15px;
    }
    .newsletter-popup-content {
        padding: 15px 0;
    }
    .newsletter-popup-image img{
        min-width: 200px;
    }
    .newsletter-input-container img {
        width: 25px;
        height: auto;
        left: 8px;
    }
    .newsletter-email-input {
        padding: 12px 12px 12px 40px;
    }
}