/* Uudiskiri – frontend. Kujundus on mooduli enda failis (mitte teemas). */

/* --- [akt_subscribe] uudiskirja tellimise vorm (jalus) --- */
.akt-subscribe {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.akt-subscribe input[type="email"] {
    flex: 1 1 220px;
    min-width: 0;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
}

.akt-subscribe input[type="email"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.akt-subscribe button[type="submit"] {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-accent);
    border: 0;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.akt-subscribe button[type="submit"]:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.akt-subscribe__note,
.akt-subscribe__msg {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.akt-subscribe__msg {
    color: #16a34a;
    font-weight: 600;
}

/* Uudiskirja hüpikaken */
.akt-sub-popup {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px 22px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.akt-sub-popup[hidden] {
    display: none;
}

.akt-sub-popup__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 1;
    color: var(--color-muted);
    background: none;
    border: 0;
    cursor: pointer;
}

.akt-sub-popup__title {
    margin: 0 28px 10px 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.akt-sub-popup__lead {
    margin: 0 0 6px;
    font-weight: 600;
}

.akt-sub-popup__list {
    margin: 0 0 14px;
    padding-left: 20px;
}

.akt-sub-popup .akt-subscribe__note {
    margin-top: 10px;
}

@media (max-width: 600px) {
    .akt-sub-popup {
        right: 16px;
        left: 16px;
        bottom: 16px;
        width: auto;
    }
}

/* Uudiskirjade seadete / kinnituse lehed ning konto uudiskirja-väljad */
.akt-sub-page {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 16px;
}

.akt-sub-btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-accent);
    border: 0;
    border-radius: 8px;
    padding: 12px 22px;
    margin: 4px 8px 4px 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.akt-sub-btn:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.akt-sub-cats {
    margin: 0 0 12px 24px;
}

.akt-sub-cats label {
    display: block;
}

.akt-sub-note {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.akt-sub-prefs {
    margin: 20px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
}

.akt-sub-prefs legend {
    font-weight: 700;
    padding: 0 6px;
}


/* Kassa/konto uudiskirja linnuke */
.woocommerce form .form-row.akt-sub-optin {
    float: none;
    clear: both;
    width: auto;
    margin: 10px 3px 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.woocommerce form .form-row.akt-sub-optin label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
}
