/* File: css/notes-popup.css */

/* Notes Popup Container */
#notes-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 4rem 2rem 2rem 2rem !important; /* Increased top padding for sticky header */
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    animation: slideUp 0.4s ease-out !important;
    position: relative !important; /* Added to contain absolute-positioned close button */
}

/* Header */
#notes-container h3 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1.5rem !important;
    position: sticky !important; /* Make header sticky */
    top: 0 !important; /* Stick to top of container */
    background: #ffffff !important; /* Prevent content bleed-through */
    padding: 0.5rem 0 !important; /* Adjust padding */
    z-index: 5 !important; /* Below close button */
}

/* Close Button */
.close-btn {
    position: absolute !important;
    top: 1rem !important; /* Positioned below top padding but visible */
    right: 1rem !important;
    background: #e5e7eb !important; /* Light gray background */
    color: #374151 !important;
    border: none !important;
    border-radius: 9999px !important; /* Circular button */
    width: 2rem !important;
    height: 2rem !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    z-index: 10 !important; /* Above sticky header */
    transition: all 0.2s ease !important;
}

.close-btn:hover {
    background: #d1d5db !important;
    transform: scale(1.1) !important;
}

/* Notes Content */
.notes-content {
    margin-top: 1.5rem !important;
}

/* Note Record Card */
.note-record {
    border-radius: 0.75rem !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 0.75rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    background: #f9fafb !important;
}

.note-record:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Record Text */
.note-record p {
    margin: 0 !important;
    color: #374151 !important;
    font-size: 1rem !important;
}

.note-record .text-sm {
    font-size: 0.875rem !important;
    color: #6b7280 !important;
}

/* Buttons in Record */
.note-record button {
    padding: 0.5rem !important;
    border-radius: 9999px !important;
    transition: all 0.2s ease !important;
}

.note-record button:hover {
    transform: scale(1.1) !important;
}

/* Add Note Button */
.add-note-btn {
    background: #3b82f6 !important;
    color: #ffffff !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
    margin-top: 1.5rem !important;
}

.add-note-btn:hover {
    background: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Add/Edit Popup */
#add-edit-note-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 2rem !important;
    width: 100% !important;
    height: 100% !important;
    overflow-y: auto !important;
    animation: slideUp 0.4s ease-out !important;
}

#add-edit-note-container h3 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1.5rem !important;
}

/* Form Fields */
#add-edit-note-container label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

#add-edit-note-container input,
#add-edit-note-container textarea {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    background: #f9fafb !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

#add-edit-note-container input:focus,
#add-edit-note-container textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    outline: none !important;
}

/* Save Button */
#add-edit-note-container button[type="submit"] {
    background: #3b82f6 !important;
    color: #ffffff !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 9999px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    margin-top: 1rem !important;
}

#add-edit-note-container button[type="submit"]:hover {
    background: #2563eb !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0 !important;
        transform: translateY(20px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}