/* Enhanced Lead Notes Design - Updated on: <?php echo date('Y-m-d H:i:s'); ?> */
.lead-note {
    position: relative;
    margin-bottom: 20px !important;
    padding: 16px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    border-left: 4px solid #ddd !important;
    transition: all 0.2s ease !important;
}

.lead-note:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
}

/* Communication type styling */
.lead-note.note-whatsapp {
    border-left-color: #25D366 !important;
}

.lead-note.note-call {
    border-left-color: #007bff !important;
}

.lead-note.note-message {
    border-left-color: #6f42c1 !important;
}

.lead-note.note-email {
    border-left-color: #fd7e14 !important;
}

.lead-note.note-meeting {
    border-left-color: #20c997 !important;
}

#lead-notes .lead-note-form {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.note-attachment {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
}

.preview-image img {
    border: 1px solid #ddd;
    padding: 3px;
    border-radius: 3px;
    max-width: 200px;
    height: auto;
}

.preview-file {
    display: inline-block;
}

.note-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.attachment-group {
    margin-bottom: 0;
}

/* Lead Notes Styling - OLD VERSION - DISABLED FOR ENHANCED */
/*
.lead-note {
    margin-bottom: 15px;
}

.lead-note .media-heading {
    margin-bottom: 5px;
}

.lead-note .note-content {
    margin-top: 5px;
    white-space: pre-wrap;
}

.lead-note .note-attachment {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 3px;
    border: 1px solid #eee;
}

.lead-note .note-image {
    margin-bottom: 8px;
}

.lead-note hr {
    margin-top: 15px;
    margin-bottom: 15px;
    border-color: #f0f0f0;
}
*/

/* Enhanced Professional Lead Notes Styling */

/* Reset existing styles and add new enhanced structure */
.lead-note {
    position: relative;
    margin-bottom: 20px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

.lead-note:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

/* Note Header */
.note-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.note-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    background: #6c757d;
}

.note-meta {
    flex: 1;
    min-width: 0;
}

.note-author {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.note-author strong {
    color: #2c3e50;
    font-weight: 600;
}

.note-timestamp {
    display: flex;
    align-items: center;
}

.note-timestamp i {
    opacity: 0.7;
}

.note-actions {
    flex-shrink: 0;
}

.note-delete {
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.note-delete:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Note Content */
.note-content {
    margin: 12px 0;
    line-height: 1.6;
    color: #495057;
}

/* Note Footer */
.note-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f8f9fa;
}

/* Communication Type Badges */
.communication-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Communication Type Specific Styling */

/* WhatsApp */
.note-whatsapp {
    border-left-color: #25D366;
}

.note-whatsapp .note-icon {
    background: #25D366;
}

.badge-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

/* Phone Call */
.note-call {
    border-left-color: #007bff;
}

.note-call .note-icon {
    background: #007bff;
}

.badge-call {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Message/SMS */
.note-message {
    border-left-color: #28a745;
}

.note-message .note-icon {
    background: #28a745;
}

.badge-message {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Email */
.note-email {
    border-left-color: #dc3545;
}

.note-email .note-icon {
    background: #dc3545;
}

.badge-email {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Meeting */
.note-meeting {
    border-left-color: #6f42c1;
}

.note-meeting .note-icon {
    background: #6f42c1;
}

.badge-meeting {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
    border: 1px solid rgba(111, 66, 193, 0.2);
}

/* General Notes */
.note-general {
    border-left-color: #6c757d;
}

.note-general .note-icon {
    background: #6c757d;
}

.badge-general {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .note-header {
        gap: 8px;
    }
    
    .note-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .note-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .note-author .staff-profile-image-xs {
        margin-bottom: 4px;
    }
}

/* Animation for new notes */
.lead-note.note-added {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme support */
.dark-theme .lead-note {
    background: #2d3748;
    color: #e2e8f0;
    border-left-color: #4a5568;
}

.dark-theme .note-author strong {
    color: #e2e8f0;
}

.dark-theme .note-content {
    color: #cbd5e0;
}

.dark-theme .note-footer {
    border-top-color: #4a5568;
}

/* Cache buster: 2025-06-04-15-45-00-FORCE-RELOAD */

/* Reminder Notification Modal Styles */
#reminder-notification-modal .modal-header {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    border-bottom: none;
}

#reminder-notification-modal .modal-header .close {
    color: white;
    opacity: 0.8;
    text-shadow: none;
}

#reminder-notification-modal .modal-header .close:hover {
    opacity: 1;
}

#reminder-notification-modal .modal-title {
    font-weight: 600;
}

#reminder-notification-modal .modal-title i {
    margin-right: 8px;
    animation: ring 2s infinite;
}

@keyframes ring {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(10deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(5deg); }
    60% { transform: rotate(-5deg); }
    70% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.reminder-notification-item {
    padding: 20px 0;
}

.reminder-notification-item .fa-bell {
    color: #f39c12;
    margin-bottom: 15px;
}

.reminder-notification-item h4 {
    margin-bottom: 20px;
    font-weight: 600;
}

.reminder-details .well {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.reminder-notification-multiple {
    padding: 10px 0;
}

.reminder-notification-multiple .fa-bell {
    color: #f39c12;
    margin-bottom: 20px;
}

.reminders-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

.reminder-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.reminder-item:last-child {
    border-bottom: none;
}

.reminder-item strong {
    color: #333;
    font-size: 14px;
}

.reminder-item .text-muted {
    font-size: 12px;
}

.reminder-item .label-warning {
    background-color: #f39c12;
    font-size: 11px;
    padding: 4px 8px;
}

#reminder-notification-modal .modal-footer {
    border-top: 1px solid #e5e5e5;
    padding: 15px 20px;
}

#reminder-notification-modal .btn {
    min-width: 120px;
    font-weight: 500;
}

#mark-reminder-complete {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    transition: all 0.3s ease;
}

#mark-reminder-complete:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* Sound toggle button styles */
.reminder-sound-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.reminder-sound-toggle:hover {
    background: #e67e22;
    transform: scale(1.1);
}

.reminder-sound-toggle.muted {
    background: #95a5a6;
}

.reminder-sound-toggle.muted:hover {
    background: #7f8c8d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reminder-notification-item .col-md-2,
    .reminder-notification-item .col-md-10 {
        text-align: center;
    }
    
    .reminder-notification-item .fa-bell {
        margin-bottom: 20px;
    }
    
    .reminders-list {
        max-height: 300px;
    }
    
    .reminder-item .col-md-8,
    .reminder-item .col-md-4 {
        text-align: left;
        margin-bottom: 10px;
    }
    
    .reminder-sound-toggle {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Animation for modal entrance */
#reminder-notification-modal.fade.in .modal-dialog {
    animation: bounceIn 0.5s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}