/**
 * Notes Component Styles
 *
 * Styling for the notes feature used in company and coach modals
 */

/* Notes Component Container */
.notes-component {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

/* Notes Header */
.notes-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.notes-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.notes-add-btn:hover {
    background: #333;
}

.notes-add-btn svg {
    flex-shrink: 0;
}

/* Notes List */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notes-loading,
.notes-error {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.notes-error {
    color: #ef4444;
}

.notes-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.notes-empty svg {
    margin: 0 auto 16px;
    opacity: 0.5;
}

.notes-empty p {
    margin: 8px 0;
    font-size: 16px;
}

.notes-empty-hint {
    font-size: 14px;
    color: #cbd5e1;
}

/* Note Item */
.note-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.note-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.note-item.note-pinned {
    background: #fffbeb;
    border-color: #fbbf24;
}

.note-pin-indicator {
    font-size: 12px;
    color: #92400e;
    margin-bottom: 8px;
    font-weight: 500;
}

.note-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.note-content {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.note-content h1 {
    font-size: 20px;
    margin: 16px 0 8px 0;
}

.note-content h2 {
    font-size: 18px;
    margin: 14px 0 6px 0;
}

.note-content h3 {
    font-size: 16px;
    margin: 12px 0 4px 0;
}

.note-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #e11d48;
}

.note-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
}

.note-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.note-content a {
    color: #2563eb;
    text-decoration: underline;
}

.note-content a:hover {
    color: #1d4ed8;
}

/* Note Tags Display */
.note-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.note-tag-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Note Meta */
.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.note-date {
    font-size: 13px;
    color: #94a3b8;
}

.note-actions-buttons {
    display: flex;
    gap: 8px;
}

.note-edit-btn,
.note-delete-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.note-edit-btn {
    color: #2563eb;
    border-color: #2563eb;
}

.note-edit-btn:hover {
    background: #eff6ff;
}

.note-delete-btn {
    color: #dc2626;
    border-color: #dc2626;
}

.note-delete-btn:hover {
    background: #fef2f2;
}

/* Note Editor */
.note-editor {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.note-editor-header {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.note-title-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
}

.note-title-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.note-close-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.note-close-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.note-content-input {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.note-content-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.note-char-counter {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    margin-bottom: 16px;
}

/* Tags Section */
.note-tags-section {
    margin-bottom: 20px;
}

.note-tags-section label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

.note-tags-container {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    min-height: 44px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.note-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.note-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.note-tag-remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #3730a3;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.note-tag-remove:hover {
    opacity: 1;
}

.note-tag-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 4px;
}

/* Note Actions */
.note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.note-pin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    user-select: none;
}

.note-pin-toggle input[type="checkbox"] {
    cursor: pointer;
}

.note-action-buttons {
    display: flex;
    gap: 12px;
}

.note-cancel-btn,
.note-save-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.note-cancel-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.note-cancel-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.note-save-btn {
    background: #1a1a1a;
    border: none;
    color: white;
}

.note-save-btn:hover {
    background: #333;
}

.note-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Note Message */
.note-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.note-message-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.note-message-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.note-message-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Floating Quick Note Button */
.modal-quick-note-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.modal-quick-note-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-quick-note-btn svg {
    flex-shrink: 0;
}

/* Quick Note Overlay */
.quick-note-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.quick-note-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.quick-note-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.quick-note-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-note-close-btn:hover {
    color: #1e293b;
}

/* Quick Note Form */
.quick-note-form {
    padding: 24px;
}

.quick-note-title-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

.quick-note-title-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.quick-note-content-input {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.quick-note-content-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.quick-note-char-counter {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    margin-bottom: 16px;
}

/* Quick Note Tags */
.quick-note-tags-section {
    margin-bottom: 20px;
}

.quick-note-tags-section label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 8px;
}

.quick-note-tags-container {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    min-height: 44px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.quick-note-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-note-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.quick-note-tag-remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #3730a3;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.quick-note-tag-remove:hover {
    opacity: 1;
}

.quick-note-tag-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 4px;
}

/* Quick Note Actions */
.quick-note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.quick-note-pin-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    user-select: none;
}

.quick-note-pin-toggle input[type="checkbox"] {
    cursor: pointer;
}

.quick-note-action-buttons {
    display: flex;
    gap: 12px;
}

.quick-note-cancel-btn,
.quick-note-save-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-note-cancel-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.quick-note-cancel-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.quick-note-save-btn {
    background: #1a1a1a;
    border: none;
    color: white;
}

.quick-note-save-btn:hover {
    background: #333;
}

.quick-note-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Note Message */
.quick-note-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.quick-note-message-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.quick-note-message-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.quick-note-message-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

[data-sbx-theme="dark"] .notes-component {
    color: #e5e7eb;
}

[data-sbx-theme="dark"] .note-item {
    background: #111827;
    border-color: #334155;
    color: #e5e7eb;
}

[data-sbx-theme="dark"] .note-item:hover {
    border-color: #475569;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

[data-sbx-theme="dark"] .note-item.note-pinned {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.48);
}

[data-sbx-theme="dark"] .note-pin-indicator,
[data-sbx-theme="dark"] .note-title {
    color: #f8fafc;
}

[data-sbx-theme="dark"] .note-content,
[data-sbx-theme="dark"] .note-pin-toggle,
[data-sbx-theme="dark"] .quick-note-pin-toggle {
    color: #cbd5e1;
}

[data-sbx-theme="dark"] .notes-loading,
[data-sbx-theme="dark"] .notes-empty,
[data-sbx-theme="dark"] .note-date,
[data-sbx-theme="dark"] .note-char-counter,
[data-sbx-theme="dark"] .quick-note-char-counter {
    color: #94a3b8;
}

[data-sbx-theme="dark"] .notes-empty-hint {
    color: #64748b;
}

[data-sbx-theme="dark"] .note-meta,
[data-sbx-theme="dark"] .quick-note-header {
    border-color: #334155;
}

[data-sbx-theme="dark"] .note-editor,
[data-sbx-theme="dark"] .quick-note-modal {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
}

[data-sbx-theme="dark"] .note-title-input,
[data-sbx-theme="dark"] .note-content-input,
[data-sbx-theme="dark"] .note-tags-container,
[data-sbx-theme="dark"] .note-tag-input,
[data-sbx-theme="dark"] .quick-note-title-input,
[data-sbx-theme="dark"] .quick-note-content-input,
[data-sbx-theme="dark"] .quick-note-tags-container,
[data-sbx-theme="dark"] .quick-note-tag-input {
    background: #111827;
    border-color: #334155;
    color: #f8fafc;
}

[data-sbx-theme="dark"] .note-title-input::placeholder,
[data-sbx-theme="dark"] .note-content-input::placeholder,
[data-sbx-theme="dark"] .note-tag-input::placeholder,
[data-sbx-theme="dark"] .quick-note-title-input::placeholder,
[data-sbx-theme="dark"] .quick-note-content-input::placeholder,
[data-sbx-theme="dark"] .quick-note-tag-input::placeholder {
    color: #64748b;
}

[data-sbx-theme="dark"] .note-title-input:focus,
[data-sbx-theme="dark"] .note-content-input:focus,
[data-sbx-theme="dark"] .quick-note-title-input:focus,
[data-sbx-theme="dark"] .quick-note-content-input:focus {
    border-color: #60a5fa;
}

[data-sbx-theme="dark"] .note-close-btn,
[data-sbx-theme="dark"] .note-edit-btn,
[data-sbx-theme="dark"] .note-delete-btn,
[data-sbx-theme="dark"] .note-cancel-btn,
[data-sbx-theme="dark"] .quick-note-cancel-btn {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

[data-sbx-theme="dark"] .note-close-btn:hover,
[data-sbx-theme="dark"] .note-cancel-btn:hover,
[data-sbx-theme="dark"] .quick-note-cancel-btn:hover {
    background: #1e293b;
    border-color: #475569;
}

[data-sbx-theme="dark"] .note-edit-btn {
    color: #93c5fd;
    border-color: #2563eb;
}

[data-sbx-theme="dark"] .note-edit-btn:hover {
    background: rgba(37, 99, 235, 0.18);
}

[data-sbx-theme="dark"] .note-delete-btn {
    color: #fca5a5;
    border-color: #dc2626;
}

[data-sbx-theme="dark"] .note-delete-btn:hover {
    background: rgba(220, 38, 38, 0.16);
}

[data-sbx-theme="dark"] .note-tags-section label,
[data-sbx-theme="dark"] .quick-note-tags-section label,
[data-sbx-theme="dark"] .quick-note-header h3 {
    color: #e5e7eb;
}

[data-sbx-theme="dark"] .note-tag,
[data-sbx-theme="dark"] .note-tag-badge,
[data-sbx-theme="dark"] .quick-note-tag {
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

[data-sbx-theme="dark"] .note-tag-remove,
[data-sbx-theme="dark"] .quick-note-tag-remove,
[data-sbx-theme="dark"] .quick-note-close-btn {
    color: #cbd5e1;
}

[data-sbx-theme="dark"] .note-content code {
    background: #1e293b;
    color: #fda4af;
}

[data-sbx-theme="dark"] .note-content pre {
    background: #020617;
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .notes-component {
        padding: 12px;
    }

    .note-editor {
        padding: 16px;
    }

    .note-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .note-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .note-action-buttons {
        width: 100%;
    }

    .note-cancel-btn,
    .note-save-btn {
        flex: 1;
    }

    /* Quick Note Mobile */
    .modal-quick-note-btn {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .modal-quick-note-btn span {
        display: none; /* Hide text, show icon only on mobile */
    }

    .quick-note-overlay {
        padding: 12px;
    }

    .quick-note-modal {
        max-height: 90vh;
    }

    .quick-note-header {
        padding: 16px 16px 0 16px;
        padding-bottom: 16px;
    }

    .quick-note-form {
        padding: 16px;
    }

    .quick-note-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .quick-note-action-buttons {
        width: 100%;
    }

    .quick-note-cancel-btn,
    .quick-note-save-btn {
        flex: 1;
    }
}
