/**
 * Notes Dialog Styles
 * Modern unified dialog design matching the CFS dialog system
 */

/* ============================================================================
   Comments List & Items
   ============================================================================ */
.commentList {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 24px;
}

.comment-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease;
}

.comment-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.comment-card-author {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.author-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.comment-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sentiment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.sentiment-positive {
    background-color: #d4edda;
    color: #155724;
}

.sentiment-neutral {
    background-color: #e2e3e5;
    color: #383d41;
}

.sentiment-negative {
    background-color: #f8d7da;
    color: #721c24;
}

.context-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #d1ecf1;
    color: #0c5460;
    border-radius: 20px;
    font-size: 1.25rem;
    white-space: nowrap;
}

.comment-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.comment-time {
    font-size: 1.25rem;
    color: #7f8c8d;
    white-space: nowrap;
}

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

.action-edit,
.action-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-edit:hover {
    background-color: #ecf0f1;
    color: #3498db;
}

.action-delete:hover {
    background-color: #ecf0f1;
    color: #e74c3c;
}

.comment-text {
    margin: 0;
    color: #34495e;
    line-height: 1.5;
    font-size: 1.5rem;
}

/* ============================================================================
   Form Styles
   ============================================================================ */
.comment-form,
.comment-edit-form {
    width: 100%;
}

.form-section {
    margin-bottom: 20px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1.5rem;
    color: #2c3e50;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group {
    margin: 0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-row-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.add-comment-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.add-comment-title {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .form-row-two-cols {
        grid-template-columns: 1fr;
    }
}

.notes-form-section select,
.notes-form-section textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1.5rem;
}

.notes-form-section select {
    background-color: #fff;
    cursor: pointer;
    height: auto;
}

.notes-form-section select:focus,
.notes-form-section textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.notes-form-section textarea {
    resize: vertical;
    min-height: 120px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* User Search Field */
.notes-user-search {
    margin-bottom: 12px;
}

.notes-user-search label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
}

.notes-user-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 1.5rem;
}

.notes-user-search input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

/* Form Group - Two Columns Layout */
.notes-form-group-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Comments List */
.notes-comments-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.notes-comments-header {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.commentList {
    clear: both;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    width: 100%;
    max-height: 35vh;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0;
}

.commentList ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.commentList li {
    border-bottom: 1px solid #ecf0f1;
    padding: 10px 12px;
    background-color: #fff;
}

.commentList li:last-child {
    border-bottom: none;
}

.commentList li.empty-placeholder {
    color: #95a5a6;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Comment Item Styling */
.comment-item {
    font-size: 1.5rem;
}

.comment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-item-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.5rem;
}

.comment-item-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 1.35rem;
    font-weight: 500;
}

.comment-item-type.positive {
    background-color: #d4edda;
    color: #155724;
}

.comment-item-type.neutral {
    background-color: #fff3cd;
    color: #856404;
}

.comment-item-type.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.comment-item-date {
    color: #7f8c8d;
    font-size: 1.35rem;
}

.comment-item-text {
    color: #34495e;
    margin-top: 6px;
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-item-scope {
    color: #95a5a6;
    font-size: 1.35rem;
    margin-top: 6px;
    font-style: italic;
}

/* Form Section Heading */
.notes-form-section h3 {
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding: 0;
}

/* Info Box */
.notes-info-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 1.5rem;
    color: #1565c0;
    line-height: 1.5;
}

/* Button Styles (for footer) */
.cfs-btn {
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    user-select: none;
    flex: 1;
}

.cfs-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.cfs-btn:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

.cfs-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: #1d4ed8;
}

.cfs-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 0.25rem 0.75rem rgba(37, 99, 235, 0.3);
}

.cfs-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 0.125rem 0.375rem rgba(37, 99, 235, 0.2);
}

.cfs-btn-secondary {
    background-color: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.cfs-btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.cfs-btn-secondary:active {
    background-color: #e5e7eb;
}

/* Error Message */
.notes-error {
    color: #c0392b;
    background-color: #fadbd8;
    border-left: 4px solid #c0392b;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 500;
}

/* Success Message */
.notes-success {
    color: #27ae60;
    background-color: #d5f4e6;
    border-left: 4px solid #27ae60;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-weight: 500;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .notes-form-group-2col {
        grid-template-columns: 1fr;
    }
    
    .commentList {
        max-height: 25vh;
    }
    
    .notes-form-section select,
    .notes-form-section textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* Animation for dialog appearance */
@keyframes slideInDialog {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notes-form {
    animation: slideInDialog 0.3s ease-out;
}

/* Refactored Form Elements */
.comment-form,
.comment-edit-form {
    width: 100%;
    max-width: 100%;
}

.comment-form {
    display: flex;
    flex-direction: column;
}

.comment-edit-form {
    display: flex;
    flex-direction: column;
}

.form-section {
    margin-bottom: 20px;
    border: none;
    padding: 0;
    flex: 1;
}

.form-section legend {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0;
    color: #2c3e50;
}

.form-group {
    margin: 12px 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.5rem;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ecf0f1;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.btn-primary {
    background-color: #27ae60;
    color: white;
}

.btn-primary:hover {
    background-color: #229954;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Comments Section */

.commentList {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Comment Item Styles */
.comment {
    padding: 16px;
    margin-bottom: 12px;
    background-color: #ffffff;
    border: 1px solid #dfe4e8;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.comment:hover {
    background-color: #f9fbfd;
    border-color: #b3d9ff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.comment-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f5f7fa;
    border: 1px solid #dfe4e8;
    border-radius: 4px;
    color: #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.comment-action-btn:hover {
    background-color: #e8f2ff;
    border-color: #3498db;
    color: #2980b9;
}

.comment-action-btn:active {
    transform: scale(0.95);
}

.comment-action-btn .comment-action-icon {
    width: 18px;
    height: 18px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.comment-body {
    padding: 0;
}

.comment-scope {
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 1.5rem;
}

.comment-type {
    margin: 0 0 8px 0;
}

.comment-type strong {
    color: #2c3e50;
}

.comment-text {
    color: #34495e;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-negative {
    color: #e74c3c;
    font-weight: 600;
}

.comment-neutral {
    color: #f39c12;
    font-weight: 600;
}

.comment-positive {
    color: #27ae60;
    font-weight: 600;
}

/* Error Messages */
.error-message {
    padding: 12px;
    margin-bottom: 16px;
    background-color: #fadbd8;
    border: 1px solid #f5b7b1;
    border-radius: 4px;
    color: #922b21;
}

.error-message p {
    margin: 0;
}

.current-exhibitor {
    background-color: #ecf0f1;
    border-left: 4px solid #3498db;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
    font-size: 1.5rem;
}

.current-exhibitor strong {
    color: #2c3e50;
}

.empty-placeholder {
    padding: 16px;
    text-align: center;
    color: #95a5a6;
    font-style: italic;
}
/* Sentiment Select - Styled as Badge */
.sentiment-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: none;
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
    background-image: 
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: 
        calc(100% - 10px) center,
        calc(100% - 6px) center;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
    padding-right: 24px;
}

.sentiment-select:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.sentiment-select:focus {
    outline: 2px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

/* Style options within the sentiment select */
.sentiment-select option {
    padding: 8px;
    background-color: #ffffff;
    color: #2c3e50;
}