/* =================================================================
   Altify Auth – Verification Page Styles
   Scoped under .altify-wrap to avoid conflicts with the theme.
   ================================================================= */

/* ── Layout wrapper ──────────────────────────────────────────────── */
.altify-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Hide third-party/theme injected Discord webhook link icons on verify pages */
a[href*="discord.com/api/webhooks"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Hide theme page headers and breadcrumb bars on verify pages */
#page-header,
.page-header,
.oceanwp-page-header,
.page-header-inner,
.site-breadcrumbs,
.breadcrumbs,
.breadcrumb-trail,
.yoast-breadcrumb {
    display: none !important;
}

/* ── Card ─────────────────────────────────────────────────────────── */
.altify-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.13);
    max-width: 460px;
    width: 100%;
    overflow: hidden;
}

/* ── Card header ──────────────────────────────────────────────────── */
.altify-card__header {
    padding: 2rem 2rem 1.75rem;
    background: #1e1f22;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.altify-card__header--success {
    background: linear-gradient(145deg, #1a7a4a 0%, #25a065 100%);
}

.altify-card__header--error {
    background: linear-gradient(145deg, #7a1a1a 0%, #c0392b 100%);
}

/* Logo / link icon in the default header */
.altify-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.altify-card__logo--home {
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: auto;
    margin-bottom: 0;
    z-index: 2;
}

.altify-card__logo svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.55);
}

.altify-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.altify-home-link:hover,
.altify-home-link:focus {
    background: rgba(255, 255, 255, 0.2);
}

.altify-home-link__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.altify-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.altify-card__subtitle {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.5;
}

/* ── Status icons (success / error) ─────────────────────────────── */
.altify-status-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.altify-status-icon svg {
    width: 54px;
    height: 54px;
}

.altify-status-icon--success svg { color: #a8f0c6; }
.altify-status-icon--error   svg { color: #f0aaa8; }

/* ── Card body ───────────────────────────────────────────────────── */
.altify-card__body {
    padding: 1.75rem 2rem 2rem;
    text-align: center;
    color: #333333;
}

/* ── Discord user badge ──────────────────────────────────────────── */
.altify-user-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 0.75rem 1.25rem 0.85rem;
    margin-bottom: 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

.altify-user-badge__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888888;
    font-weight: 600;
}

.altify-user-badge__name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #5865f2; /* Discord blurple */
    word-break: break-word;
}

/* ── Instructions text ───────────────────────────────────────────── */
.altify-instructions {
    color: #555555;
    font-size: 0.94rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* ── Steam sign-in button ────────────────────────────────────────── */
.altify-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.75rem;
    border-radius: 7px;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
}

.altify-btn:hover {
    text-decoration: none;
}

.altify-btn:active {
    transform: scale(0.97);
}

.altify-btn--steam {
    background-color: #171a21;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.altify-btn--steam:hover,
.altify-btn--steam:focus {
    background-color: #2a475e;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.altify-btn--home {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.altify-btn--home:hover,
.altify-btn--home:focus {
    background-color: #1d4ed8;
    color: #ffffff;
}

.altify-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.altify-btn--disabled,
.altify-btn--disabled:hover,
.altify-btn--disabled:focus {
    background: #9ca3af;
    color: #f3f4f6;
    box-shadow: none;
    cursor: not-allowed;
}

/* ── Terms / consent block ──────────────────────────────────────── */
.altify-consent {
    margin: 0 0 1rem;
    display: grid;
    gap: 0.7rem;
    text-align: left;
}

.altify-terms-link {
    justify-self: start;
    background: transparent;
    border: none;
    padding: 0;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.altify-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: #374151;
    font-size: 0.88rem;
    line-height: 1.45;
}

.altify-consent__label input {
    margin-top: 0.15rem;
}

.altify-consent-note {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.altify-terms-panel {
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 1rem;
    color: #1f2937;
}

.altify-terms-panel h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #111827;
}

.altify-terms-panel p {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.altify-terms-panel__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.9rem;
}

/* ── Terms modal ────────────────────────────────────────────────── */
.altify-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 99999;
}

.altify-modal.is-open {
    display: block;
}

.altify-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.altify-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(680px, calc(100vw - 2rem));
    margin: 8vh auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.3rem;
    max-height: 84vh;
    overflow: auto;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    color: #1f2937;
}

.altify-modal__dialog h3 {
    margin: 0 0 0.8rem;
    font-size: 1.12rem;
}

.altify-modal__dialog p {
    margin: 0 0 0.7rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.altify-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.altify-modal__btn {
    border: 0;
    border-radius: 7px;
    padding: 0.55rem 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.altify-modal__btn--secondary {
    background: #e5e7eb;
    color: #111827;
}

.altify-modal__btn--primary {
    background: #2563eb;
    color: #ffffff;
}

/* ── Steam avatar ────────────────────────────────────────────────── */
.altify-avatar {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    border: 3px solid #e5e7eb;
    object-fit: cover;
}

/* ── Linked account details table ────────────────────────────────── */
.altify-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.25rem 1rem;
    margin: 0 0 1.25rem;
    text-align: left;
}

.altify-details__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    gap: 1rem;
}

.altify-details__row + .altify-details__row {
    border-top: 1px solid #e5e7eb;
}

.altify-details__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    flex-shrink: 0;
}

.altify-details__value {
    font-weight: 600;
    color: #111827;
    word-break: break-word;
    text-align: right;
}

/* ── Done message ────────────────────────────────────────────────── */
.altify-done-msg {
    font-size: 0.88rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.altify-action-row {
    margin: 1rem 0 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .altify-wrap {
        padding: 1.25rem 0.5rem;
    }

    .altify-card__header,
    .altify-card__body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .altify-card__title {
        font-size: 1.15rem;
    }

    .altify-btn {
        width: 100%;
    }

    .altify-details__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .altify-details__value {
        text-align: left;
    }
}
