/* ── Custom User Auth v1.3 — cua-style.css ── */

/* ── Suppress empty <p> tags WordPress adds around shortcodes ── */
.cua-wrap ~ p:empty,
p:empty { display: none; }

/* ── Wrapper / Card ── */
.cua-wrap {
    max-width: 420px;
    margin: 2.5rem auto;
    padding: 0 1.75rem 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #9ca3af;
    border-radius: 12px;
    box-sizing: border-box;
}

/* ── Tab switcher ── */
.cua-tabs {
    display: flex;
    margin: 0 -1.75rem 1.4rem;
    border-bottom: 2px solid #9ca3af;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #f3f4f6;
}

.cua-tab {
    flex: 1;
    padding: 0.75rem 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #374151;
    background: #f3f4f6;
    transition: background .15s, color .15s;
    letter-spacing: 0.01em;
    display: block;
}

.cua-tab:first-child { border-radius: 10px 0 0 0; }
.cua-tab:last-child  { border-radius: 0 10px 0 0; }

.cua-tab-active {
    background: #1d4ed8 !important;
    color: #fff !important;
    text-decoration: none !important;
}

.cua-tab:not(.cua-tab-active):hover {
    background: #e5e7eb;
    color: #111827;
    text-decoration: none;
}

/* ── Title ── */
.cua-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 1.4rem;
    letter-spacing: -0.02em;
    color: #111827;
    border: none;
    padding: 0;
}

/* ── Fields ── */
.cua-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 1rem;
}

.cua-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.cua-form input[type="text"],
.cua-form input[type="email"],
.cua-form input[type="password"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid #9ca3af;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    background: #fafafa;
    color: #111;
    outline: none;
    font-family: inherit;
}

.cua-form input[type="text"]:focus,
.cua-form input[type="email"]:focus,
.cua-form input[type="password"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.18);
    background: #fff;
}

.cua-field small {
    font-size: 11px;
    color: #6b7280;
}

/* ── Custom checkbox (no icon font needed) ── */
.cua-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.cua-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    user-select: none;
    line-height: 1;
}

.cua-checkbox-box {
    width: 17px;
    height: 17px;
    border: 2px solid #9ca3af;
    border-radius: 4px;
    display: inline-block;
    background: #fff;
    flex-shrink: 0;
    position: relative;
    transition: border-color .15s, background .15s;
    box-sizing: border-box;
}

/* CSS-only checkmark — no icon font */
.cua-checkbox:checked + .cua-checkbox-box {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.cua-checkbox:checked + .cua-checkbox-box::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(42deg);
}

/* ── Remember / Forgot row ── */
.cua-remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.25rem 0 1.25rem;
    font-size: 13px;
}

.cua-remember a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.cua-remember a:hover { text-decoration: underline; }

/* ── Primary button ── */
.cua-btn {
    display: block;
    width: 100%;
    padding: 0.72rem 1rem;
    background: #1d4ed8;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    letter-spacing: 0.01em;
    font-family: inherit;
}

.cua-btn:hover  { background: #1e40af; }
.cua-btn:active { transform: scale(0.98); }

/* ── Alternate link ── */
.cua-alt-link {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 1.1rem 0 0;
}

.cua-alt-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.cua-alt-link a:hover { text-decoration: underline; }

/* ── Notices — CSS-only icons via ::before, no icon font ── */
.cua-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.cua-notice-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    margin-top: 1px;
}

/* Success: green circle with CSS checkmark */
.cua-notice.cua-success {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    color: #14532d;
}

.cua-icon-ok {
    background: #22c55e;
}

.cua-icon-ok::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 2px;
    width: 4px;
    height: 7px;
    border: 1.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(42deg);
}

/* Error: red circle with CSS × */
.cua-notice.cua-error {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    color: #7f1d1d;
}

.cua-icon-err {
    background: #ef4444;
}

.cua-icon-err::before,
.cua-icon-err::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 1.5px;
    height: 10px;
    background: #fff;
    border-radius: 1px;
}

.cua-icon-err::before { transform: rotate(45deg); }
.cua-icon-err::after  { transform: rotate(-45deg); }

/* ── Error list ── */
.cua-errors {
    list-style: none;
    padding: 0.7rem 1rem;
    margin: 0 0 1.25rem;
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 6px;
    color: #7f1d1d;
    font-size: 13px;
}

.cua-errors li {
    margin: 4px 0;
    padding-left: 1.2em;
    position: relative;
}

.cua-errors li::before {
    content: '✕';
    position: absolute;
    left: 0;
    font-size: 11px;
}
