/**
 * Donasiku Fundraiser Auth Form Styles
 *
 * Modern clean design with pill tab switcher, icon inputs, and responsive layout.
 *
 * @since 1.2.0
 */

/* ── Wrapper ────────────────────────────────── */
.dnk-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    width: 100%;
}

/* ── Card ───────────────────────────────────── */
.dnk-auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 16px;
    /*box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);*/
    border: 1px solid #ebebeb;
    padding: 36px 32px;
    position: relative;
}

/* ── Tabs ───────────────────────────────────── */
.dnk-auth-tabs {
    display: flex;
    position: relative;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
}

.dnk-auth-tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.dnk-auth-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.25s ease;
    border-radius: 10px;
}

.dnk-auth-tab.active {
    color: #1e293b;
}

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

/* Slider position for register tab */
.dnk-auth-tabs[data-active="register"] .dnk-auth-tab-slider {
    transform: translateX(100%);
}

/* ── Forms ──────────────────────────────────── */
.dnk-auth-form {
    display: none;
}

.dnk-auth-form.active {
    display: block;
    animation: dnkFadeIn 0.3s ease;
}

@keyframes dnkFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Form Groups ────────────────────────────── */
.dnk-form-group {
    margin-bottom: 20px;
}

.dnk-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* ── Input Wrapper ──────────────────────────── */
.dnk-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.dnk-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 1;
}

.dnk-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    color: #1e293b;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dnk-input-wrap input::placeholder {
    color: #b0bec5;
}

.dnk-input-wrap input:focus {
    border-color: var(--theme-palette-color-1);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dnk-input-wrap input:focus~.dnk-input-icon,
.dnk-input-wrap input:focus+.dnk-input-icon {
    color: var(--theme-palette-color-1);
}

/* Focus icon color - handle SVG before input */
.dnk-input-wrap:focus-within .dnk-input-icon {
    color: var(--theme-palette-color-1);
}

/* ── Password Toggle ────────────────────────── */
.dnk-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 1;
}

.dnk-password-toggle:hover {
    color: #64748b;
}

.dnk-password-toggle svg {
    width: 18px;
    height: 18px;
}

/* ── Submit Button ──────────────────────────── */
.dnk-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--theme-palette-color-1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.01em;
}

.dnk-auth-btn:hover {
    background: var(--theme-palette-color-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.dnk-auth-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.dnk-auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Spinner ────────────────────────────────── */
.dnk-spinner {
    width: 18px;
    height: 18px;
    animation: dnkSpin 0.8s linear infinite;
}

@keyframes dnkSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Form Footer ────────────────────────────── */
.dnk-form-footer {
    text-align: right;
    margin-bottom: 20px;
}

.dnk-form-footer a,
.dnk-forgot-link,
.dnk-back-login {
    font-size: 13px;
    font-weight: 500;
    color: var(--theme-palette-color-1);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dnk-form-footer a:hover,
.dnk-forgot-link:hover,
.dnk-back-login:hover {
    color: var(--theme-palette-color-2);
}

/* ── Forgot Password Header ─────────────────── */
.dnk-forgot-header {
    text-align: center;
    margin-bottom: 24px;
}

.dnk-forgot-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.dnk-forgot-header p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ── Message ────────────────────────────────── */
.dnk-auth-message {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    animation: dnkFadeIn 0.3s ease;
}

.dnk-auth-message.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.dnk-auth-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ── Already Logged In Icon ─────────────────── */
.dnk-auth-icon {
    width: 56px;
    height: 56px;
    background: #ecfdf5;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #047857;
}

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

    .dnk-auth-tabs {
        margin-bottom: 24px;
    }

    .dnk-auth-tab {
        font-size: 13px;
        padding: 9px 12px;
    }

    .dnk-form-group label {
        font-size: 12px;
    }

    .dnk-input-wrap input {
        /* >= 16px prevents iOS zoom on focus */
        padding: 11px 14px 11px 40px;
    }

    .dnk-auth-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}