/* ============================================================
   NPD Social Login — Frontend Styles
   v1.2.0
============================================================ */

/* ── Wrapper ──────────────────────────────────────────────── */
.npd-sl-wrapper,
.npd-sl-um-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Divider ──────────────────────────────────────────────── */
.npd-sl-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.npd-sl-divider::before,
.npd-sl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}
.npd-sl-divider span {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Button Grid ─────────────────────────────────────────── */
.npd-sl-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* icon_text: show label, fit in 2 columns */
.npd-sl-style-icon_text .npd-sl-btn {
    justify-content: flex-start;
    padding: 10px 14px;
}

/* icon_only: smaller square buttons */
.npd-sl-style-icon_only .npd-sl-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
}
.npd-sl-style-icon_only .npd-sl-btn-label { display: none; }
.npd-sl-style-icon_only .npd-sl-buttons {
    grid-template-columns: repeat(auto-fill, 48px);
}

/* text_only: full-width rows */
.npd-sl-style-text_only .npd-sl-buttons {
    grid-template-columns: 1fr;
}
.npd-sl-style-text_only .npd-sl-btn-icon { display: none; }

/* ── Button Base ─────────────────────────────────────────── */
.npd-sl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    text-align: left;
    width: 100%;
    line-height: 1;
    position: relative;
    overflow: hidden;
}
.npd-sl-btn:hover {
    background: #f9f9f9;
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.npd-sl-btn:active {
    transform: translateY(0);
    box-shadow: none;
}
.npd-sl-btn:focus {
    outline: 2px solid var(--npd-provider-color, #4285f4);
    outline-offset: 2px;
}
.npd-sl-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}
.npd-sl-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.npd-sl-btn-icon svg {
    display: block;
}
.npd-sl-btn-label {
    flex: 1;
    color: #fff;
}

/* ── Spinner ─────────────────────────────────────────────── */
.npd-sl-btn.loading .npd-sl-btn-icon::after {
    content: '';
    display: block;
    width: 16px; height: 16px;
    border: 2px solid #ddd;
    border-top-color: var(--npd-provider-color, #333);
    border-radius: 50%;
    animation: npd-sl-spin 0.65s linear infinite;
}
.npd-sl-btn.loading .npd-sl-btn-icon svg { display: none; }
@keyframes npd-sl-spin { to { transform: rotate(360deg); } }

/* ── Dark mode support ───────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .npd-sl-btn {
        background: #1a1a1a;
        border-color: #333;
        color: #f0f0f0;
    }
    .npd-sl-btn:hover {
        background: #222;
        border-color: #555;
    }
    .npd-sl-divider::before,
    .npd-sl-divider::after { background: #333; }
    .npd-sl-divider span { color: #777; }
}

/* ── Ultimate Member overrides ──────────────────────────── */
.um-form .npd-sl-wrapper,
.um-form .npd-sl-um-wrapper {
    padding: 0 20px 16px;
}

/* ── Profile Tab ────────────────────────────────────────── */
.npd-sl-profile-tab h3 {
    margin: 0 0 16px;
    font-size: 16px;
}
.npd-sl-connected-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.npd-sl-connected-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}
.npd-sl-connected-item.connected {
    border-color: #4caf50;
    background: #f9fff9;
}
.npd-sl-item-icon { display: flex; width: 22px; flex-shrink: 0; }
.npd-sl-item-name { flex: 1; font-weight: 500; }
.npd-sl-item-status { font-size: 12px; color: #888; }
.npd-sl-connected-item.connected .npd-sl-item-status { color: #4caf50; }

/* ── Notice ─────────────────────────────────────────────── */
.npd-sl-notice {
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    font-size: 13px;
    color: #555;
}

/* ============================================================
   Account Deletion Request panel (v1.2.0)
   Inherits --npd-primary from theme if defined; falls back to a
   neutral red since this is a destructive-intent action.
============================================================ */
.npd-sl-delreq {
    --npd-delreq-accent: var(--npd-primary, #d63638);
    max-width: 520px;
    margin: 16px 0;
    padding: 22px 24px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.npd-sl-delreq h4 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}
.npd-sl-delreq-intro {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #555;
}
.npd-sl-delreq-reason-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}
.npd-sl-delreq-reason {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    transition: border-color .15s ease;
}
.npd-sl-delreq-reason:focus {
    outline: none;
    border-color: var(--npd-delreq-accent);
}
.npd-sl-delreq-confirm-row {
    margin: 14px 0 18px;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}
.npd-sl-delreq-confirm-row label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.npd-sl-delreq-confirm { margin-top: 2px; flex-shrink: 0; }

.npd-sl-delreq-submit.um-button,
.npd-sl-delreq-submit {
    display: inline-block;
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--npd-delreq-accent);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease, transform .05s ease;
}
.npd-sl-delreq-submit:hover { opacity: .9; }
.npd-sl-delreq-submit:active { transform: translateY(1px); }
.npd-sl-delreq-submit:disabled { opacity: .55; cursor: default; }

/* Pending + done states */
.npd-sl-delreq-pending,
.npd-sl-delreq-done {
    padding: 16px 18px;
    border-radius: 10px;
    background: #fff8e1;
    border-left: 4px solid #ffb300;
    font-size: 14px;
    line-height: 1.5;
    color: #5a4a00;
}
.npd-sl-delreq-pending h4 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #5a4a00;
}
.npd-sl-delreq-done {
    background: #e8f5e9;
    border-left-color: #43a047;
    color: #1b5e20;
}
