/* ============================================================
   Karjeros dienos – shared form / auth styles
   Uses CSS variables from the theme (--blue, --purple, etc.)
   ============================================================ */

/* ---------- Honeypot fields (visually hidden, not display:none) ---------- */
.kd-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Auth page wrapper ---------- */
.kd-auth-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 16px 64px;
}

.kd-auth-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .07);
    padding: 44px 44px 36px;
    width: 100%;
    max-width: 500px;
}

.kd-auth-header { margin-bottom: 4px; }

.kd-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--grey-dark, #727B80);
    text-decoration: none;
    margin-bottom: 14px;
    transition: color .15s;
}
.kd-auth-back:hover { color: var(--blue, #0B4DC7); text-decoration: none; }

.kd-auth-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--black, #000);
    margin: 0 0 6px;
    line-height: 1.2;
}

.kd-auth-subtitle {
    font-size: 14px;
    color: var(--grey-dark, #727B80);
    margin: 0 0 28px;
}

.kd-auth-bottom {
    text-align: center;
    font-size: 13px;
    color: var(--grey-dark, #727B80);
    margin: 28px 0 0;
}
.kd-auth-bottom a {
    color: var(--blue, #0B4DC7);
    text-decoration: none;
    font-weight: 600;
}
.kd-auth-bottom a:hover { text-decoration: underline; }

/* ---------- Role selector ---------- */
.kd-role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.kd-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 20px 22px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    text-decoration: none !important;
    color: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
    cursor: pointer;
}
.kd-role-card:hover {
    border-color: var(--blue, #0B4DC7);
    background: #f5f9ff;
    box-shadow: 0 0 0 4px rgba(11, 77, 199, .08);
    color: inherit;
}
.kd-role-card svg {
    color: var(--blue, #0B4DC7);
    flex-shrink: 0;
}
.kd-role-card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--black, #000);
}
.kd-role-card span {
    display: block;
    font-size: 12px;
    color: var(--grey-dark, #727B80);
}

/* ---------- Notices ---------- */
.kd-notice {
    padding: 13px 16px;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 22px;
}
.kd-notice a { font-weight: 600; }

.kd-notice--error {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}
.kd-notice--error a { color: #dc2626; }

.kd-notice--success {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    color: #14532d;
}

.kd-notice--info {
    background: #eff6ff;
    border-left: 4px solid var(--blue, #0B4DC7);
    color: #1e3a8a;
}

/* ---------- Form layout ---------- */
.kd-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.kd-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kd-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ---------- Labels ---------- */
.kd-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--black, #000);
    line-height: 1.3;
}
.kd-required {
    color: var(--blue, #0B4DC7);
    margin-left: 2px;
}
.kd-optional {
    font-weight: 400;
    font-size: 12px;
    color: var(--grey-dark, #727B80);
}
.kd-hint {
    font-size: 12px;
    color: var(--grey-dark, #727B80);
    line-height: 1.4;
}

/* ---------- Inputs ---------- */
.kd-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-family: inherit;
    font-size: 14px;
    color: var(--black-80, rgba(0,0,0,.8));
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    line-height: 1.5;
}
.kd-input:focus {
    outline: none;
    border-color: var(--blue, #0B4DC7);
    box-shadow: 0 0 0 3px rgba(11, 77, 199, .13);
}
.kd-input::placeholder { color: #6b7280; }
.kd-input:disabled { background: #f9fafb; color: #4b5563; cursor: not-allowed; }

/* Activation code input */
.kd-input--code {
    letter-spacing: .4em;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    padding: 14px 20px;
}

/* Password toggle wrapper */
.kd-input-wrap {
    position: relative;
}
.kd-input-wrap .kd-input {
    padding-right: 46px;
}
.kd-pw-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--grey-dark, #727B80);
    transition: color .15s;
}
.kd-pw-toggle:hover { color: var(--blue, #0B4DC7); }
.kd-pw-toggle svg { width: 18px; height: 18px; }

/* ---------- Checkboxes ---------- */
.kd-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
    color: var(--black-80, rgba(0,0,0,.8));
}
.kd-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--blue, #0B4DC7);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.kd-checkbox-label a { color: var(--blue, #0B4DC7); text-decoration: none; }
.kd-checkbox-label a:hover { text-decoration: underline; }

/* ---------- Remember / forgot row ---------- */
.kd-field--split {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.kd-forgot {
    font-size: 13px;
    color: var(--blue, #0B4DC7);
    text-decoration: none;
    white-space: nowrap;
}
.kd-forgot:hover { text-decoration: underline; }

/* ---------- Submit button ---------- */
.kd-btn {
    display: block;
    width: 100%;
    padding: 13px 24px;
    background: var(--blue, #0B4DC7);
    color: #fff !important;
    border: none;
    border-radius: 7px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 4px;
    text-align: center;
    text-decoration: none;
}
.kd-btn:hover  { background: #0d3fa0; color: #fff !important; text-decoration: none; }
.kd-btn:active { transform: scale(.98); }

.kd-btn--outline {
    background: transparent;
    border: 2px solid var(--blue, #0B4DC7);
    color: var(--blue, #0B4DC7) !important;
}
.kd-btn--outline:hover { background: var(--blue, #0B4DC7); color: #fff !important; }

.kd-btn--secondary {
    background: #fff;
    border: 1.5px solid #d1d5db;
    color: #374151 !important;
}
.kd-btn--secondary:hover { background: #f9fafb; color: #374151 !important; }

.kd-btn--danger {
    background: #dc2626;
}
.kd-btn--danger:hover { background: #b91c1c; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .kd-auth-card   { padding: 28px 20px 24px; }
    .kd-field-row   { grid-template-columns: 1fr; }
    .kd-role-selector { grid-template-columns: 1fr; }
    .kd-field--split  { flex-direction: column; gap: 10px; align-items: flex-start; }
    .kd-auth-title  { font-size: 22px; }
    .kd-input--code { font-size: 20px; }
}
