/* ============================================
   NOTES TIMELINE - Finders & Company
   Premium Timeline Design
   ============================================ */

/* Notes Section Header Button */
.notes-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--fc-primary), var(--fc-primary-light, #2a5a5a));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 60, 60, 0.2);
}

.notes-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30, 60, 60, 0.3);
}

.notes-add-btn:active {
    transform: translateY(0);
}

/* Empty State */
.notes-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.notes-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 24px;
    color: #94a3b8;
}

.notes-empty-state h4 {
    color: #334155;
    font-size: 16px;
    margin-bottom: 8px;
}

.notes-empty-state p {
    color: #64748b;
    font-size: 13px;
    max-width: 320px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.notes-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--fc-primary, #1e3c3c);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.notes-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 60, 60, 0.25);
}

/* Pinned Section */
.notes-pinned-section {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}

.notes-pinned-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #d97706;
    margin-bottom: 12px;
}

.notes-pinned-label i {
    font-size: 11px;
}

.notes-pinned-section .note-card {
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.1);
}

.notes-pinned-section .note-card:last-child {
    margin-bottom: 0;
}

/* Date Group */
.notes-date-group {
    margin-bottom: 24px;
}

.notes-date-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    margin-bottom: 12px;
    padding-left: 4px;
}

.notes-date-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
}

/* Note Card */
.note-card {
    display: flex;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.note-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.note-card-pinned {
    border-color: #fde68a;
    background: #fffef5;
}

/* Colored Stripe */
.note-card-stripe {
    width: 5px;
    min-height: 100%;
    background: var(--note-color, #6b7280);
    flex-shrink: 0;
}

/* Card Body */
.note-card-body {
    flex: 1;
    padding: 14px 16px;
    min-width: 0;
}

.note-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.note-card-type {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.note-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.note-type-badge i {
    font-size: 10px;
}

.note-time {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

/* Actions */
.note-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.note-card:hover .note-card-actions {
    opacity: 1;
}

.note-action-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    transition: all 0.15s;
}

.note-action-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.note-action-btn .fa-thumbtack.pinned {
    color: #f59e0b;
    transform: rotate(-45deg);
}

.note-action-delete:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* Content */
.note-card-content {
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Footer */
.note-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.note-author i {
    color: #cbd5e1;
}

.note-edited {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #d1d5db;
    font-style: italic;
}

/* Edit Mode */
.note-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 2px solid var(--fc-primary, #1e3c3c);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
}

.note-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.note-edit-save, .note-edit-cancel {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.note-edit-save {
    background: var(--fc-primary, #1e3c3c);
    color: white;
}

.note-edit-save:hover {
    opacity: 0.9;
}

.note-edit-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.note-edit-cancel:hover {
    background: #e2e8f0;
}

/* ============================================
   ADD NOTE MODAL
   ============================================ */

.note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 16px;
}

.note-modal-overlay.active {
    opacity: 1;
}

.note-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.note-modal-overlay.active .note-modal {
    transform: translateY(0);
}

.note-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc, #fff);
}

.note-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.note-modal-header h3 i {
    color: var(--fc-primary, #1e3c3c);
}

.note-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s;
}

.note-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.note-modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Type Selector */
.note-type-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.note-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.note-type-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-type-option:hover {
    border-color: var(--type-color, #6b7280);
    color: var(--type-color, #6b7280);
    background: var(--type-bg, #f3f4f6);
}

.note-type-option.active {
    border-color: var(--type-color, #6b7280);
    background: var(--type-bg, #f3f4f6);
    color: var(--type-color, #6b7280);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--type-color, #6b7280) 15%, transparent);
}

.note-type-option i {
    font-size: 12px;
}

/* Textarea */
.note-content-field {
    margin-bottom: 16px;
}

.note-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    color: #1e293b;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.note-textarea:focus {
    border-color: var(--fc-primary, #1e3c3c);
    box-shadow: 0 0 0 3px rgba(30, 60, 60, 0.1);
    background: white;
}

.note-textarea::placeholder {
    color: #94a3b8;
}

/* Pin Toggle */
.note-options-row {
    display: flex;
    align-items: center;
}

.note-pin-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

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

.note-pin-slider {
    width: 36px;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.note-pin-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.note-pin-toggle input:checked + .note-pin-slider {
    background: #f59e0b;
}

.note-pin-toggle input:checked + .note-pin-slider::after {
    transform: translateX(16px);
}

.note-pin-text {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.note-pin-text i {
    margin-right: 2px;
    color: #d1d5db;
}

.note-pin-toggle input:checked ~ .note-pin-text i {
    color: #f59e0b;
}

/* Modal Footer */
.note-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.note-modal-cancel {
    padding: 10px 20px;
    background: white;
    color: #64748b;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.note-modal-cancel:hover {
    background: #f8fafc;
    border-color: #d1d5db;
}

.note-modal-save {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--fc-primary, #1e3c3c), var(--fc-primary-light, #2a5a5a));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(30, 60, 60, 0.2);
}

.note-modal-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(30, 60, 60, 0.3);
}

.note-modal-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .notes-add-btn span {
        display: none;
    }
    
    .notes-add-btn {
        padding: 8px 12px;
    }

    .note-card-actions {
        opacity: 1;
    }

    .note-type-options {
        gap: 6px;
    }

    .note-type-option {
        padding: 6px 10px;
        font-size: 12px;
    }

    .note-type-option span {
        display: none;
    }

    .note-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .note-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .note-modal-body {
        padding: 16px;
    }

    .note-card-header {
        flex-direction: column;
        gap: 6px;
    }

    .note-card-actions {
        align-self: flex-end;
    }

    .note-card-body {
        padding: 12px;
    }

    .note-card-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .notes-empty-state {
        padding: 32px 16px;
    }

    .note-modal-header {
        padding: 16px;
    }

    .note-modal-footer {
        flex-direction: column;
    }

    .note-modal-cancel,
    .note-modal-save {
        width: 100%;
        justify-content: center;
    }

    .note-textarea {
        min-height: 100px;
    }
}
