/* AIDEN Subscribe — Email Widget (self-contained, no external assets) */

.ctx-subscribe {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 24px 0;
}

.ctx-subscribe * {
    box-sizing: border-box;
}

.ctx-subscribe__form {
    background: #f7f8fc;
    border: 1px solid #e4e7f0;
    border-radius: 10px;
    padding: 20px;
}

.ctx-subscribe__heading {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.3;
    color: #1a1a2e;
}

.ctx-subscribe__message {
    margin: 0 0 14px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.ctx-subscribe__row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ctx-subscribe__email {
    flex: 1 1 200px;
    min-width: 0;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #cbd0e0;
    border-radius: 6px;
    background: #fff;
    color: #222;
}

.ctx-subscribe__email:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.ctx-subscribe__button {
    flex: 0 0 auto;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #4f46e5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ctx-subscribe__button:hover {
    background: #4338ca;
}

.ctx-subscribe__button:disabled {
    opacity: 0.6;
    cursor: default;
}

.ctx-subscribe__status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}

.ctx-subscribe__status--success { color: #15803d; }
.ctx-subscribe__status--error { color: #b91c1c; }
.ctx-subscribe__status--info { color: #555; }

/* Honeypot — keep it in the DOM but far off-screen and out of the tab order. */
.ctx-subscribe__hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Screen-reader-only helper (in case the theme lacks .screen-reader-text). */
.ctx-subscribe .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* -------- Popup modal -------- */
.ctx-subscribe-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctx-subscribe-popup[hidden] { display: none; }

.ctx-subscribe-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ctx-subscribe-popup__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    max-width: 420px;
    width: 92%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ctx-subscribe-popup__dialog .ctx-subscribe { margin: 0; }
.ctx-subscribe-popup__dialog .ctx-subscribe__form { border: none; background: transparent; padding: 16px; }

.ctx-subscribe-popup__close,
.ctx-subscribe-sticky__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    z-index: 2;
}

.ctx-subscribe-popup__close:hover,
.ctx-subscribe-sticky__close:hover { color: #333; }

/* -------- Sticky bar -------- */
.ctx-subscribe-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: #1a1a2e;
    padding: 12px 44px 12px 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.ctx-subscribe-sticky[hidden] { display: none; }

.ctx-subscribe-sticky .ctx-subscribe { margin: 0; max-width: 760px; margin-left: auto; margin-right: auto; }
.ctx-subscribe-sticky .ctx-subscribe__form { background: transparent; border: none; padding: 0; }
.ctx-subscribe-sticky .ctx-subscribe__message { color: #e6e6f0; margin-bottom: 8px; }
.ctx-subscribe-sticky .ctx-subscribe__heading { color: #fff; }
.ctx-subscribe-sticky .ctx-subscribe__status { color: #e6e6f0; }
.ctx-subscribe-sticky .ctx-subscribe__status--success { color: #86efac; }
.ctx-subscribe-sticky .ctx-subscribe__status--error { color: #fca5a5; }

.ctx-subscribe-sticky__close { color: #bbb; }
.ctx-subscribe-sticky__close:hover { color: #fff; }

/* -------- Toast -------- */
.ctx-subscribe-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 100001;
    background: #15803d;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    max-width: 90%;
}

.ctx-subscribe-toast--error { background: #b91c1c; }

.ctx-subscribe-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
    .ctx-subscribe__row { flex-direction: column; }
    .ctx-subscribe__button { width: 100%; }
}
