/* CEH Show Notes — front-end styles */

.ceh-notes-wrap {
    background: #ffffff;
    border: 1px solid #e2e2de;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Header ── */
.ceh-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e2de;
}

.ceh-notes-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a18;
}

.ceh-notes-quota {
    font-size: 0.75rem;
    color: #9a9a94;
    white-space: nowrap;
}

/* ── Form ── */
.ceh-notes-form {
    margin-bottom: 1.25rem;
}

.ceh-notes-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1px solid #c8c8c2;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.875rem;
    color: #1a1a18;
    background: #fff;
    resize: vertical;
    line-height: 1.55;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ceh-notes-textarea:focus {
    outline: none;
    border-color: #c9391a;
    box-shadow: 0 0 0 3px rgba(201, 57, 26, 0.1);
}

.ceh-notes-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
}

.ceh-notes-charcount {
    font-size: 0.72rem;
    color: #9a9a94;
}

.ceh-notes-charcount.ceh-notes-charcount--warn {
    color: #a06018;
}

/* ── Buttons ── */
.ceh-notes-save-btn,
.ceh-notes-cancel-btn,
.ceh-notes-edit-btn,
.ceh-notes-delete-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid transparent;
    line-height: 1.4;
}

.ceh-notes-save-btn {
    background: #c9391a;
    color: #fff;
    border-color: #c9391a;
}

.ceh-notes-save-btn:hover {
    background: #a82d14;
    border-color: #a82d14;
}

.ceh-notes-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ceh-notes-cancel-btn {
    background: transparent;
    color: #5a5a55;
    border-color: #c8c8c2;
}

.ceh-notes-cancel-btn:hover {
    background: #f5f5f3;
}

.ceh-notes-edit-btn {
    background: transparent;
    color: #1a6eb5;
    border: none;
    padding: 0.2rem 0.4rem;
    font-size: 0.775rem;
}

.ceh-notes-edit-btn:hover {
    color: #0c447c;
    text-decoration: underline;
}

.ceh-notes-delete-btn {
    background: transparent;
    color: #c0392b;
    border: none;
    padding: 0.2rem 0.4rem;
    font-size: 0.775rem;
}

.ceh-notes-delete-btn:hover {
    color: #791f1f;
    text-decoration: underline;
}

/* ── Messages ── */
.ceh-notes-message {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.ceh-notes-message.ceh-notes-message--error {
    color: #c0392b;
}

.ceh-notes-message.ceh-notes-message--success {
    color: #1e7e45;
}

/* ── Upgrade notice ── */
.ceh-notes-upgrade-notice {
    background: #fdf4e7;
    border: 1px solid #f0c070;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: #a06018;
    margin-bottom: 1.25rem;
}

.ceh-notes-upgrade-notice a {
    color: #854f0b;
    font-weight: 500;
}

/* ── List ── */
.ceh-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ceh-notes-empty {
    font-size: 0.85rem;
    color: #9a9a94;
    text-align: center;
    padding: 1rem 0;
    margin: 0;
}

/* ── Individual note item ── */
.ceh-notes-item {
    background: #f5f5f3;
    border: 1px solid #e2e2de;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    transition: border-color 0.12s;
}

.ceh-notes-item:hover {
    border-color: #c8c8c2;
}

.ceh-notes-item--deleting {
    opacity: 0.5;
    pointer-events: none;
}

.ceh-notes-item-text {
    font-size: 0.875rem;
    color: #1a1a18;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.ceh-notes-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.6rem;
    gap: 0.5rem;
}

.ceh-notes-item-date {
    font-size: 0.72rem;
    color: #9a9a94;
}

.ceh-notes-item-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.ceh-notes-edit-area {
    margin-top: 0.75rem;
}

/* ── Login prompt ── */
.ceh-notes-login-prompt {
    font-size: 0.875rem;
    color: #5a5a55;
    background: #f5f5f3;
    border: 1px solid #e2e2de;
    border-radius: 6px;
    padding: 0.85rem 1rem;
}

.ceh-notes-login-prompt a {
    color: #c9391a;
    font-weight: 500;
}

/* ── Error state ── */
.ceh-notes-error {
    font-size: 0.85rem;
    color: #c0392b;
    margin: 0;
}

/* ── Loading state on items ── */
@keyframes ceh-notes-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.ceh-notes-item--saving {
    animation: ceh-notes-pulse 1s ease-in-out infinite;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   User Notes Dashboard (ceh-notes-dashboard)
   ═══════════════════════════════════════════════════════════════ */

.ceh-notes-dashboard {
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Dashboard header ── */
.ceh-notes-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e2de;
    flex-wrap: wrap;
}

/* ── View mode toggle ── */
.ceh-notes-mode-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #c8c8c2;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.ceh-mode-btn {
    padding: 0.35rem 0.85rem;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    cursor: pointer;
    border: none;
    background: #ffffff;
    color: #5a5a55;
    transition: background 0.12s, color 0.12s;
    border-right: 1px solid #c8c8c2;
    line-height: 1.4;
}

.ceh-mode-btn:last-child { border-right: none; }

.ceh-mode-btn:hover {
    background: #f5f5f3;
    color: #1a1a18;
}

.ceh-mode-btn.active {
    background: #c9391a;
    color: #ffffff;
    font-weight: 500;
}

/* ── View panels ── */
.ceh-notes-view { display: none; }
.ceh-notes-view.active { display: block; }

/* ── Show group ── */
.ceh-notes-group {
    border: 1px solid #e2e2de;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.ceh-notes-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    background: #f5f5f3;
    border-bottom: 1px solid #e2e2de;
    gap: 0.75rem;
}

.ceh-notes-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a18;
    text-decoration: none;
}

.ceh-notes-group-title:hover { color: #c9391a; text-decoration: underline; }

.ceh-notes-group-count {
    font-size: 0.72rem;
    color: #9a9a94;
    white-space: nowrap;
}

/* Notes inside a group have no outer border (group provides it) */
.ceh-notes-group .ceh-notes-item {
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e2e2de;
}
.ceh-notes-group .ceh-notes-item:last-child { border-bottom: none; }

/* ── Dashboard note item extras ── */
.ceh-notes-dashboard-item .ceh-notes-item-event-label {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.ceh-notes-dashboard-item .ceh-notes-item-event-label a {
    color: #c9391a;
    text-decoration: none;
}
.ceh-notes-dashboard-item .ceh-notes-item-event-label a:hover {
    text-decoration: underline;
}

.ceh-notes-view-show-link {
    font-size: 0.775rem;
    color: #1a6eb5;
    text-decoration: none;
    padding: 0.2rem 0.4rem;
}
.ceh-notes-view-show-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   Guest login prompt (both widgets)
   ═══════════════════════════════════════════════════════════════ */

.ceh-notes-login-prompt {
    background: #f5f5f3;
    border: 1px solid #e2e2de;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.ceh-notes-login-prompt p {
    font-size: 0.875rem;
    color: #5a5a55;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.ceh-notes-login-btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: #c9391a;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.12s;
}
.ceh-notes-login-btn:hover { background: #a82d14; color: #ffffff; }
