/* ============================================================
   KeRa Custom Proposal — Auth Widget (nav button + modal)
   ============================================================ */

/* ---- Nav button (login / account) ---- */
.kera-cp-nav-auth-item {
    display: flex !important;
    align-items: center;
}

.kera-cp-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    line-height: 1 !important;
    transition: opacity 150ms ease, transform 150ms ease, background 150ms ease !important;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
    font-family: inherit !important;
    text-decoration: none !important;
    vertical-align: middle;
    flex-shrink: 0;
}
.kera-cp-nav-btn:hover {
    transform: scale(1.05);
    text-decoration: none !important;
}
.kera-cp-nav-btn:active {
    transform: scale(0.96);
}

/* Icon-only circle — matches E-shop pill height (~36px) */
.kera-cp-nav-login-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background: transparent !important;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
}
.kera-cp-nav-login-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

.kera-cp-nav-account-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background: transparent !important;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
}
.kera-cp-nav-account-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
}

/* ---- Account dropdown ---- */
.kera-cp-nav-auth-item--logged {
    position: relative;
}

.kera-cp-account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0;
    padding: 6px;
    z-index: 99998;
}
.kera-cp-account-dropdown.is-open {
    display: block;
}

.kera-cp-account-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    transition: background 120ms ease;
}
.kera-cp-account-dropdown li a:hover {
    background: #f3f4f6;
}
.kera-cp-account-dropdown li a svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.kera-cp-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 8px;
}

.kera-cp-dropdown-logout {
    color: #dc2626 !important;
}
.kera-cp-dropdown-logout svg {
    opacity: 0.8 !important;
}

/* ---- Login modal ---- */
#kera-cp-login-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
#kera-cp-login-modal.is-open {
    display: flex;
}

.kera-cp-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(3px);
}

.kera-cp-login-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}

.kera-cp-login-header {
    background: #1a1a2e;
    color: #fff;
    padding: 32px 28px 24px;
    text-align: center;
    position: relative;
}

.kera-cp-login-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.kera-cp-login-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.2;
}

.kera-cp-login-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    opacity: 0.7;
    color: #fff;
}

.kera-cp-modal-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease;
    padding: 0;
}
.kera-cp-modal-close-btn:hover {
    background: rgba(255,255,255,0.25);
}

.kera-cp-login-body {
    padding: 28px;
}

.kera-cp-auth-field {
    margin-bottom: 18px;
}
.kera-cp-auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.kera-cp-auth-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    box-sizing: border-box;
    outline: none;
    background: #fff;
}
.kera-cp-auth-field input:focus {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 3px rgba(26,26,46,0.1);
}

.kera-cp-login-error {
    margin: 0 0 14px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    display: none;
}
.kera-cp-login-error.is-visible {
    display: block;
}

.kera-cp-login-submit {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 150ms ease;
    font-family: inherit;
}
.kera-cp-login-submit:hover {
    opacity: 0.88;
}
.kera-cp-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
