/* =============================================================================
   WM Emails Checkout – My Account Subscription Manager
   ============================================================================= */

/* ── Page title & intro ─────────────────────────────────────────────────────── */

.wm-acct__title {
    font-size: 1.35em;
    font-weight: 700;
    color: #0b0344;
    margin: 0 0 0.4em;
}

.wm-acct__intro {
    color: #6b7280;
    font-size: 0.9em;
    margin: 0 0 1.6em;
    line-height: 1.6;
}

.wm-acct__empty {
    margin-top: 1em;
}

/* ── New-subscription CTA banner ────────────────────────────────────────────── */

.wm-acct__new-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    background: #f0f4ff;
    border: 1px solid #c7d6fe;
    border-radius: 8px;
    padding: 1em 1.25em;
    margin-bottom: 1.75em;
}

.wm-acct__new-sub-text {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    line-height: 1.4;
}

.wm-acct__new-sub-text strong {
    color: #0b0344;
    font-size: 0.95em;
}

.wm-acct__new-sub-text span {
    color: #6b7280;
    font-size: 0.85em;
}

.wm-acct__new-sub-btn {
    display: inline-block;
    flex-shrink: 0;
    background: #4175fc;
    color: #fff;
    font-size: 0.88em;
    font-weight: 600;
    padding: 0.55em 1.1em;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}

.wm-acct__new-sub-btn:hover {
    background: #2a5de0;
    color: #fff;
    text-decoration: none;
}

@media ( max-width: 480px ) {
    .wm-acct__new-sub {
        flex-direction: column;
        align-items: flex-start;
    }

    .wm-acct__new-sub-btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Card ───────────────────────────────────────────────────────────────────── */

.wm-acct__card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.75em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Card header (dark navy bar) */
.wm-acct__card-header {
    background: #0b0344;
    padding: 16px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.wm-acct__domain {
    font-size: 1.15em;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
    word-break: break-all;
}

.wm-acct__meta {
    margin-top: 5px;
    font-size: 0.78em;
    color: #a8c7d4;
}

/* Mailbox counter badge */
.wm-acct__mb-counter {
    flex-shrink: 0;
    font-size: 0.78em;
    color: #7dd3fc;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 3px 10px;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 2px;
}

.wm-acct__sep {
    margin: 0 5px;
    opacity: 0.5;
}

/* Card body */
.wm-acct__body {
    padding: 20px 24px;
    background: #ffffff;
}

/* ── Mailbox table ───────────────────────────────────────────────────────────── */

.wm-acct__mailboxes {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
    font-size: 0.9em;
    table-layout: fixed;
}
/* 4-column widths: address, name, password, actions */
.wm-acct__mailboxes th:nth-child(1),
.wm-acct__mailboxes td:nth-child(1) { width: 28%; }
.wm-acct__mailboxes th:nth-child(2),
.wm-acct__mailboxes td:nth-child(2) { width: 22%; }
.wm-acct__mailboxes th:nth-child(3),
.wm-acct__mailboxes td:nth-child(3) { width: 36%; }
.wm-acct__mailboxes th:nth-child(4),
.wm-acct__mailboxes td:nth-child(4) { width: 14%; }
.wm-acct__mailboxes th {
    text-align: left;
    padding: 9px 12px;
    background: #f3f5f5;
    color: #494b51;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.wm-acct__mailboxes td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* Removed row */
.wm-acct__mb-row--removed {
    opacity: 0.35;
    background: #fff5f5 !important;
}

.wm-acct__mb-row--removed .wm-acct__mb-local,
.wm-acct__mb-row--removed .wm-acct__at-domain {
    text-decoration: line-through;
}

/* New (added) row */
.wm-acct__mb-row--new td {
    background: #f0f5ff;
}

/* Email address cell */
.wm-acct__mb-local {
    color: #4175fc;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
}

.wm-acct__at-domain {
    color: #9ca3af;
    font-family: 'Courier New', Courier, monospace;
}

/* Text inputs inside the table */
.wm-acct__new-addr-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wm-acct__local-input,
.wm-acct__name-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wm-acct__local-input:focus,
.wm-acct__name-input:focus {
    border-color: #4175fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 117, 252, 0.12);
}

/* Empty-state row */
.wm-acct__empty-row td {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px 12px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.wm-acct__btn {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    background: #ffffff;
    color: #0b0344;
    font-size: 0.88em;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.wm-acct__btn:hover {
    background: #f3f5f5;
    border-color: #b0b8c4;
}

/* Primary (blue) */
.wm-acct__btn--primary {
    background: #4175fc;
    border-color: #4175fc;
    color: #ffffff;
}

.wm-acct__btn--primary:hover {
    background: #2d5ee0;
    border-color: #2d5ee0;
    color: #ffffff;
}

.wm-acct__btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Remove (red-tinted) */
.wm-acct__btn--remove {
    color: #dc2626;
    border-color: #fecaca;
    font-size: 0.82em;
    padding: 4px 10px;
}

.wm-acct__btn--remove:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* Add mailbox (dashed) */
.wm-acct__btn--add {
    margin-bottom: 16px;
    color: #4175fc;
    border-style: dashed;
}

.wm-acct__btn--add:hover {
    background: #f0f4ff;
}

/* Ghost (secondary outline) button */
.wm-acct__btn--ghost {
    border-color: #d0d5dd;
    color: #6b7280;
    font-size: 0.82em;
    padding: 4px 10px;
}

.wm-acct__btn--ghost:hover {
    background: #f9fafb;
    color: #374151;
}

/* Active (selected action) */
.wm-acct__btn--active {
    background: #4175fc;
    border-color: #4175fc;
    color: #ffffff;
}

.wm-acct__btn--active:hover {
    background: #2d5ee0;
}

/* ── Footer row ─────────────────────────────────────────────────────────────── */

.wm-acct__footer {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.wm-acct__hint {
    font-size: 0.8em;
    color: #9ca3af;
}

/* ── Password cell ──────────────────────────────────────────────────── */

.wm-acct__mb-pw {
    vertical-align: top;
    padding-top: 12px !important;
}

.wm-acct__pw-reset-wrap {
    margin-top: 6px;
}

.wm-acct__pw-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wm-acct__pw-input {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.88em;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wm-acct__pw-input:focus {
    border-color: #4175fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 117, 252, 0.12);
}

.wm-acct__pw-toggle,
.wm-acct__pw-suggest {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.wm-acct__pw-toggle:hover,
.wm-acct__pw-suggest:hover {
    background: #e5edff;
    color: #4175fc;
    border-color: #c7d6fe;
}

/* Strength bar */
.wm-acct__pass-strength {
    margin-top: 5px;
}

.wm-acct__pass-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.wm-acct__pass-fill {
    display: block;
    height: 100%;
    border-radius: 2px;
    transition: width 0.2s, background 0.2s;
    width: 0;
}

.wm-acct__pass-label {
    font-size: 0.75em;
    font-weight: 600;
}

/* ── Upgrade hint ───────────────────────────────────────────────────── */

.wm-acct__upgrade-hint {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.85em;
    color: #374151;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 8px 14px;
    margin-bottom: 16px;
}

.wm-acct__upgrade-hint a {
    color: #b45309;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Notice / feedback ──────────────────────────────────────────────────────── */

.wm-acct__notice {
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 5px;
    font-size: 0.88em;
    line-height: 1.5;
}

.wm-acct__notice--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.wm-acct__notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Domain summary row ─────────────────────────────────────────────────────── */

.wm-acct__domain-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.wm-acct__summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wm-acct__summary-label {
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.wm-acct__summary-value {
    font-size: 0.9em;
    font-weight: 600;
    color: #0b0344;
}

/* ── Domain action buttons ──────────────────────────────────────────────────── */

.wm-acct__label {
    margin: 0 0 10px;
    color: #494b51;
    font-size: 0.9em;
    font-weight: 500;
}

.wm-acct__action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

/* ── Action request form ────────────────────────────────────────────────────── */

.wm-acct__action-form {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 4px;
}

.wm-acct__action-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88em;
    font-weight: 500;
    color: #494b51;
}

.wm-acct__textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wm-acct__textarea:focus {
    border-color: #4175fc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(65, 117, 252, 0.12);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .wm-acct__card-header,
    .wm-acct__body {
        padding: 14px 16px;
    }

    /* On small screens, collapse the table to one row = address + password + remove */
    .wm-acct__mailboxes th:nth-child(2),
    .wm-acct__mailboxes td:nth-child(2),
    .wm-acct__mailboxes th:nth-child(4),
    .wm-acct__mailboxes td:nth-child(4) {
        display: none;
    }

    /* Column widths for 2 remaining visible columns */
    .wm-acct__mailboxes th:nth-child(1),
    .wm-acct__mailboxes td:nth-child(1) { width: 50%; }
    .wm-acct__mailboxes th:nth-child(3),
    .wm-acct__mailboxes td:nth-child(3) { width: 50%; }

    .wm-acct__pw-input-row {
        flex-wrap: wrap;
    }

    .wm-acct__pw-input {
        min-width: 0;
    }

    .wm-acct__action-btns {
        flex-direction: column;
    }

    .wm-acct__domain-summary {
        gap: 12px;
    }

    .wm-acct__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
