/* Patron sign-in / sign-up modal (live chat) */
.read-patron-auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 20, 40, 0.55);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.read-patron-auth-overlay.is-open {
    display: flex;
}

.read-patron-auth-modal {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 33, 71, 0.35);
    overflow: hidden;
    animation: readPatronAuthIn 0.25s ease;
}

@keyframes readPatronAuthIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.read-patron-auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: linear-gradient(135deg, #002147 0%, #800000 100%);
    color: #fff;
}

.read-patron-auth-head h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.read-patron-auth-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.read-patron-auth-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.read-patron-auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.read-patron-auth-tab.is-active {
    background: #fff;
    color: #002147;
    box-shadow: inset 0 -2px 0 #002147;
}

.read-patron-auth-body {
    padding: 20px;
}

.read-patron-auth-field {
    margin-bottom: 14px;
}

.read-patron-auth-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.read-patron-auth-field input,
.read-patron-auth-field select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

.read-patron-auth-field input:focus,
.read-patron-auth-field select:focus {
    outline: none;
    border-color: #002147;
    box-shadow: 0 0 0 2px rgba(0, 33, 71, 0.12);
}

.read-patron-auth-hint {
    font-size: 11px;
    color: #64748b;
    margin: -6px 0 12px;
    line-height: 1.4;
}

.read-patron-auth-submit {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #002147 0%, #800000 100%);
    cursor: pointer;
    margin-top: 4px;
}

.read-patron-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.read-patron-auth-msg {
    display: none;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.read-patron-auth-msg.is-error {
    display: block;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.read-patron-auth-msg.is-success {
    display: block;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.read-patron-auth-panel {
    display: none;
}

.read-patron-auth-panel.is-active {
    display: block;
}
