
/* ==========================================
   TTM NEWSLETTER FORM
========================================== */

/* Form Paragraph */
.ttm-newsletter-form p {
    margin: 0 0 20px;
}

/* Labels */
.ttm-newsletter-form label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--ttm-blackishcolor, #0c121c);
}

/* Name & Email Inputs */
.ttm-newsletter-form input[type="text"], .ttm-newsletter-form input[type="email"], .ttm-newsletter-form input[name="name"] {
    display: block;
    width: 100%;
    height: 52px;
    margin-top: 9px;
    padding: 12px 16px;
    border: 1px solid var(--ttm-bordercolor, #e2e2e2);
    border-radius: 50px;
    background: var(--ttm-whitecolor, #f5f7fb);
    color: var(--ttm-blackishcolor, #0c121c);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Input Focus */
.ttm-newsletter-form input[type="text"]:focus,
.ttm-newsletter-form input[type="email"]:focus,
.ttm-newsletter-form input[name="name"]:focus {
    border-color: var(--ttm-secondarycolor) !important;
	background: var(--ttm-whitecolor) !important;
}

/* Consent Checkbox */
.ttm-newsletter-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 2px 8px 0 0;
    accent-color: var(--ttm-skincolor, #ffad11);
    flex-shrink: 0;
    cursor: pointer;
}

.ttm-newsletter-form p:has(input[type="checkbox"]) label {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 14px;
    line-height: 22px;
    font-weight: 400;
    color: var(--body-fonts-color, #5d6d7d);
    cursor: pointer;
}

/* Subscribe Button */
.ttm-newsletter-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 52px;
    padding: 14px 30px;
    border: 0;
    border-radius: var(--ttm-button-shape, 2em);
    background: var(--ttm-skincolor, #ffad11);
    color: var(--ttm-blackishcolor);
    font-family: var(--button-font-family, 'Creato Display');
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ttm-newsletter-form button[type="submit"]:hover {
    background: var(--ttm-secondarycolor, #0c121c);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Disabled Button */
.ttm-newsletter-form button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

/* Newsletter Notice */
.ttm-newsletter-notice {
    margin: 12px 0;
    font-size: 14px;
    line-height: 22px;
}

/* ==========================================
   NEWSLETTER SUCCESS / ERROR MODAL
========================================== */

/* Modal Background */
.ttm-newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
}

/* Hidden Modal */
.ttm-newsletter-modal[hidden] {
    display: none !important;
}

/* Modal Panel */
.ttm-newsletter-modal__panel {
    width: min(100%, 460px);
    box-sizing: border-box;
    border-radius: 14px;
    padding: 35px 30px;
    background: #ffffff;
    color: #172033;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    text-align: center;
    animation: ttmNewsletterPopup 0.3s ease;
}

/* Modal Heading */
.ttm-newsletter-modal__panel h2 {
    margin: 0 0 12px;
    color: var(--ttm-blackishcolor);
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 600;
}

/* Modal Message */
.ttm-newsletter-modal__message {
    margin: 0 0 22px;
    color: #5d6d7d;
    font-size: 15px;
    line-height: 1.55;
}

/* Modal Close Button */
.ttm-newsletter-close {
    border: 0;
    border-radius: var(--ttm-button-shape, 2em);
    padding: 12px 28px;
    background: var(--ttm-skincolor, #ffad11);
    color: var(--ttm-blackishcolor);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ttm-newsletter-close:hover {
    background: var(--ttm-blackishcolor);
    color: #ffffff;
}

/* Error Modal Button */
.ttm-newsletter-modal--error .ttm-newsletter-close {
    background: #b42318;
    color: #ffffff;
}

.ttm-newsletter-modal--error .ttm-newsletter-close:hover {
    background: #8f1d14;
}

/* Close Button Focus */
.ttm-newsletter-close:focus {
    outline: 3px solid #ffad11;
    outline-offset: 3px;
}

/* Modal Animation */
@keyframes ttmNewsletterPopup {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */

@media (max-width: 767px) {

    .ttm-newsletter-form button[type="submit"] {
        width: 100%;
    }

    .ttm-newsletter-modal__panel {
        padding: 28px 22px;
    }
}

@media (max-width: 480px) {
    .ttm-newsletter-modal {
        padding: 14px;
    }

    .ttm-newsletter-modal__panel {
        padding: 22px 18px;
    }

    .ttm-newsletter-modal__panel h2 {
        font-size: 22px;
    }
}
