/* 交易详情样式 */

/* 日记编辑样式 */
.notes-display-container {
    min-height: 100px;
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: var(--bg-card, white);
    border: 1px solid var(--border-color, #dee2e6);
    color: var(--text-primary, #212529);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}


.notes-display-container:hover {
    background-color: var(--bg-hover, #f8f9fa);
}

.notes-display-container::after {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted, #6c757d);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notes-display-container:hover::after {
    opacity: 1;
}

.notes-edit-container {
    margin-top: 0;
}

.notes-edit-container textarea,
.notes-edit-container .toast-ui-editor-wrapper textarea {
    width: 100%;
    height: 100%;
    resize: none;
    border: 1px solid var(--border-color, #ced4da);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9em;
    line-height: 1.5;
    background-color: var(--bg-input, #fff);
    color: var(--text-primary, #212529);
}

.notes-edit-container .toast-ui-editor-wrapper .toastui-editor-defaultUI {
    width: 100%;
    height: 100%;
}

.notes-edit-container textarea:focus,
.notes-edit-container .toast-ui-editor-wrapper:focus-within {
    width: 100%;
    height: 100%;
    border-color: #0056b3;
    box-shadow: 0 0 0 0.3rem rgba(0, 123, 255, 0.35);
}

/* 快捷键提示 */
.shortcut-hint {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted, #6c757d);
    background: var(--bg-elevated, rgba(255, 255, 255, 0.9));
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    pointer-events: none;
}

/* 保存状态动画和样式 */
.saving-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

#notes-saving-indicator {
    animation: none;
    transition: all 0.3s ease;
}

#notes-saving-indicator.saving {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#notes-saving-indicator.success {
    color: #28a745;
    animation: fadeInOut 2s ease;
}

#notes-saving-indicator.error {
    color: #dc3545;
    animation: shake 0.5s ease;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 编辑器保存状态样式 */
.notes-edit-container.saving {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.notes-edit-container.saving::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-body, rgba(255, 255, 255, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.notes-edit-container.saving .saving-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary, #007bff);
    font-size: 0.9rem;
    z-index: 11;
}

/* Markdown内容样式 */
.notes-display-container h1,
.notes-display-container h2,
.notes-display-container h3,
.notes-display-container h4,
.notes-display-container h5,
.notes-display-container h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.notes-display-container p {
    margin-bottom: 0.8rem;
}

.notes-display-container pre {
    background-color: var(--bg-hover, #f1f3f4);
    color: var(--text-primary, #212529);
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.notes-display-container blockquote {
    border-left: 4px solid var(--primary, #007bff);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary, #6c757d);
    font-style: italic;
}

.notes-display-container ul,
.notes-display-container ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.notes-display-container img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 0.5rem 0;
}

.notes-display-container code {
    background-color: var(--bg-hover, #f1f3f4);
    color: var(--text-primary, #212529);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.notes-display-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.notes-display-container th,
.notes-display-container td {
    border: 1px solid var(--border-color, #dee2e6);
    padding: 0.5rem;
    text-align: left;
    color: var(--text-primary, #212529);
}

.notes-display-container th {
    background-color: var(--bg-hover, #f8f9fa);
    font-weight: 600;
    color: var(--text-primary, #212529);
}

/* Bootstrap原生等高布局补充 */
.card.h-100 .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#notes_partial_notes {
    margin-top: 0 !important;
}

