/* SD Platform — Login / Register Page
 * Background matches the website's light content sections (white/bg-light).
 * Site header visible. White card with clean shadow like service cards.
 * Only loaded when [sd_login_form] shortcode is present.
 */

/* ── Show site header, hide footer / mobile nav / admin bar ────── */
body:has(.sdp-login-wrap) .sd-mobile-nav,
body:has(.sdp-login-wrap) .sd-footer,
body:has(.sdp-login-wrap) .sd-clients-banner,
body:has(.sdp-login-wrap) #wpadminbar {
    display: none !important;
}

/* ── Page background — matches homepage light sections ─────────── */
body:has(.sdp-login-wrap) {
    background: #f8fafc !important;
    min-height: 100vh;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body:has(.sdp-login-wrap) #sd-main-content,
body:has(.sdp-login-wrap) main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ── Full-viewport wrapper — offset for fixed 72px header ──────── */
.sdp-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 100px 16px 60px; /* 100px top = 72px header + breathing room */
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Card — matches service cards on homepage ──────────────────── */
.sdp-login-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 16px 40px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

/* ── Brand mark ────────────────────────────────────────────────── */
.sdp-login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.sdp-login-brand__icon {
    width: 36px;
    height: 36px;
    background: #2563eb;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.sdp-login-brand__name {
    font-size: 15px;
    font-weight: 700;
    color: #0f2b46;
    letter-spacing: 0.2px;
    line-height: 1;
    font-family: 'Plus Jakarta Sans', inherit;
}

.sdp-login-brand__sub {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* ── Sliding toggle switch ─────────────────────────────────────── */
.sdp-auth-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 11px;
    padding: 4px;
    margin-bottom: 28px;
    position: relative;
}

/* Sliding white pill */
.sdp-auth-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 6px);
    height: calc(100% - 8px);
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Pill slides right when Register is active */
.sdp-auth-tabs:has([data-tab="register"].sdp-auth-tab--active)::before {
    transform: translateX(calc(100% + 4px));
}

.sdp-auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.sdp-auth-tab--active {
    color: #0f2b46;
}

.sdp-auth-tab:not(.sdp-auth-tab--active):hover {
    color: #64748b;
}

/* ── Auth panels ───────────────────────────────────────────────── */
.sdp-auth-panel {
    display: none;
}

.sdp-auth-panel--active {
    display: block;
}

/* ── Panel title ───────────────────────────────────────────────── */
.sdp-login-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f2b46;
    margin: 0 0 20px;
    letter-spacing: -0.3px;
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', inherit;
}

/* ── Form ──────────────────────────────────────────────────────── */
.sdp-login-form,
.sdp-register-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sdp-form-group {
    position: relative;
}

/* ── Input ─────────────────────────────────────────────────────── */
.sdp-input {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: #1e293b;
    font-size: 15px;
    padding: 12px 14px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.sdp-input::placeholder {
    color: #64748b;
}

.sdp-input:focus {
    border-color: #3db8d6;
    box-shadow: 0 0 0 3px rgba(61, 184, 214, 0.12);
    background: #ffffff;
}

/* Password field — room for eye toggle */
.sdp-form-group--pw .sdp-input {
    padding-right: 46px;
}

/* ── Password visibility toggle ────────────────────────────────── */
.sdp-pw-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color 0.2s;
}

.sdp-pw-toggle:hover {
    color: #64748b;
}

/* ── Primary button — matches site's Get a Quote blue ──────────── */
.sdp-btn-primary {
    background: #2563eb;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 20px;
    margin-top: 4px;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    width: 100%;
    letter-spacing: 0.1px;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.sdp-btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.sdp-btn-primary:active:not(:disabled) {
    transform: scale(0.985);
}

.sdp-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Notices ───────────────────────────────────────────────────── */
.sdp-login-notice {
    border-radius: 8px;
    font-size: 13px;
    padding: 10px 14px;
    line-height: 1.5;
}

.sdp-login-error {
    background: rgba(220, 60, 60, 0.06);
    border: 1px solid rgba(220, 60, 60, 0.2);
    color: #dc2626;
}

.sdp-login-success {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #065f46;
}

/* ── Footer links ──────────────────────────────────────────────── */
.sdp-forgot-link {
    text-align: center;
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.sdp-forgot-link a,
.sdp-switch-tab {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    font-weight: 500;
}

.sdp-forgot-link a:hover,
.sdp-switch-tab:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.sdp-forgot-link span {
    font-size: 13px;
    color: #94a3b8;
}

/* ── Already logged in ─────────────────────────────────────────── */
.sdp-login-already {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    padding: 24px;
}

.sdp-login-already a {
    color: #2563eb;
    text-decoration: none;
}

.sdp-login-already a:hover {
    text-decoration: underline;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media ( max-width: 480px ) {
    .sdp-login-card {
        padding: 28px 20px;
        border-radius: 14px;
    }

    .sdp-login-title {
        font-size: 18px;
    }

    .sdp-login-wrap {
        padding-top: 90px;
        align-items: flex-start;
    }
}
