:root {
    --primary-color: #4a6fa5;
    --primary-dark: #3a5980;
    --secondary-color: #6c757d;
    --light-gray: #f5f5f5;
    --mid-gray: #e0e0e0;
    --dark-gray: #333;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --text-color: #212529;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-color);
    background-color: #f9f9f9;
    line-height: 1.4;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--mid-gray);
}

h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.instructions {
    font-size: 12pt;
    color: var(--secondary-color);
    margin-top: 10px;
    text-align: center;
    padding: 10px;
    font-style: italic;
}

.instructions p {
    margin-bottom: 10px;
}

/* Conversation List Styles */
.conversation-item {
    overflow: hidden;
    transition: all var(--transition-speed);
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

/* Hide conversation items beyond the first 10 by default */
.limit-conversations .conversation-item:nth-child(n+11) {
    display: none;
}

.show-more-conversations {
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* Only display the "Show more" link if there are more than 10 conversation items */
.limit-conversations .conversation-item:nth-child(n+11) ~ .show-more-conversations {
    display: block;
}

/* Hide reminder items beyond the first 10 by default */
.limit-reminders .reminder-item:nth-child(n+11) {
    display: none;
}

.show-more-reminders {
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* Only display the "Show more" link if there are more than 10 reminder items */
.limit-reminders .reminder-item:nth-child(n+11) ~ .show-more-reminders {
    display: block;
}

/* Hide note items beyond the first 10 by default */
.limit-notes .note-item:nth-child(n+11) {
    display: none;
}

.show-more-notes {
    text-align: center;
    margin-top: 10px;
    display: none;
}

/* Only display the "Show more" link if there are more than 10 note items */
.limit-notes .note-item:nth-child(n+11) ~ .show-more-notes {
    display: block;
}

.conversation-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.conversation-item .conversation-header {
    padding: 5px;
    margin: 0;
}

.conversation-item .conversation-actions {
    display: flex;
    align-items: flex-start;
    padding-top: 5px;
}

.conversation-header {
    padding: 5px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    transition: background-color var(--transition-speed);
}

.conversation-header:hover {
    background-color: #e9ecef;
}

.conversation-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.conversation-summary {
    line-height: 1.2;
    margin-bottom: 5px;
    color: #666;
    font-size: 0.9em;
}

.duration {
    font-style: italic;
    margin-left: 5px;
}

/* Ensure conversation details don't interfere with flex layout */
.conversation-details {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    transition: max-height var(--transition-speed), padding var(--transition-speed);
    background-color: var(--light-gray);
    border-left: 3px solid #666;
    margin-left: 10px;
}

.conversation-item.expanded .conversation-details {
    max-height: 60svh;
    padding: 10px;
    transition: max-height 0.5s ease-in-out, padding var(--transition-speed);
    overflow-y: auto;
}

.speakers {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.conversation-text {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #333;
}

.conversation-text::before {
    content: "Transcript: ";
    font-weight: bold;
}

p.transcript-segment {
    margin-bottom: 4pt;
}

.no-conversations {
    text-align: center;
    color: var(--secondary-color);
    font-style: italic;
    padding: 30px 0;
}

.user-id {
    font-weight: bold;
    color: var(--primary-color);
}

.note-text {
    white-space: pre-wrap;
}

/* Mobile optimization */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    .conversation-header {
        padding: 8px;
        flex-direction: column;
    }

    .conversation-item.expanded .conversation-details {
        padding: 8px;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .auto-buttons-container {
        order: 2;
        flex-basis: 100%;
        justify-content: flex-start;
        margin-top: 5px;
    }

    .auto-label {
        font-size: 11px;
    }

    .auto-buttons-container .auto-add-button {
        width: 44px;
        height: 26px;
        font-size: 10px;
    }
}

/* Reminder Section */
.reminder-section, .notes-section, .conversation-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reminder-list, .notes-list, .conversation-list {
    margin-top: 5px;
}

.reminder-item, .note-item {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.reminder-checkbox {
    margin-right: 15px;
    padding-top: 2px;
}

.reminder-checkbox input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.custom-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.reminder-checkbox input[type="checkbox"]:checked + .custom-checkbox {
    background-color: #4caf50;
    border-color: #4caf50;
}

.reminder-checkbox input[type="checkbox"]:checked + .custom-checkbox:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.reminder-content, .note-content {
    flex-grow: 1;
}

.reminder-content.completed .reminder-text {
    text-decoration: line-through;
    color: #999;
}

.reminder-text, .note-text {
    margin: 0 0 5px;
    font-size: 16px;
    outline: none;
}

.reminder-text:focus, .note-text:focus {
/*    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ced4da;
*/
}

.reminder-due-date {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.reminder-actions, .note-actions {
    display: flex;
    align-items: center;
}

.delete-reminder, .delete-note, .link-reminder, .link-note {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0 8px;
}

.delete-reminder, .delete-note {
    color: #dc3545;
    font-size: 24px;

}

.delete-reminder {
    display: none;
}

.link-reminder, .link-note {
    color: #4a6fa5;
}

.delete-reminder:hover, .delete-note:hover,
.link-reminder:hover, .link-note:hover {
    opacity: 1;
}

.conversation-item.highlighted {
    border: 3px solid #4a89dc;
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

.editing {
/*    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ced4da;
*/
}

.reminder-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.reminder-link:hover {
    text-decoration: underline;
}

/* Notes Section */

.note-date {
    font-size: 12px;
    color: #666;
    margin: 0;
}


/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 5px;
    }

    .conversation-item {
        flex-direction: column;
        align-items: stretch;
    }

    .conversation-item .conversation-actions {
        position: absolute;
        top: 5px;
        right: 5px;
        padding-top: 0;
    }
}

/* Highlighted Segment */
.highlighted-segment {
    background-color: rgba(255, 255, 0, 0.3);
    border-left: 3px solid #ffc107;
    padding-left: 8px;
    margin-left: -11px;
    animation: fade-highlight 3s;
}

@keyframes fade-highlight {
    from { background-color: rgba(255, 255, 0, 0.5); }
    to { background-color: rgba(255, 255, 0, 0.3); }
}

/* Section header with add button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    column-gap: 10px;
    padding: 5px;
}

.section-header h2 {
    flex-grow: 1;
    margin-bottom: 0;
}

.hint-text {
    font-size: 12px;
    color: #666;
}

.add-button {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.add-button:hover {
    background-color: #0b7dda;
}

.auto-add-button {
    background-color: var(--secondary-color);
    font-size: 10px;
    width: 50px;
    border-radius: 15px;
    margin-right: 8px;
    font-weight: 500;
}

.auto-add-button:hover {
    background-color: #5a6268;
}

.auto-add-button:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.auto-buttons-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.auto-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.auto-buttons-container .auto-add-button {
    width: 40px;
    height: 24px;
    font-size: 9px;
    margin-right: 0;
    border-radius: 12px;
}

/* Recording toggle styles */
.recording-toggle-container {
    text-align: center;
    margin: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    vertical-align: middle;
    margin-left: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: bold;
    margin-right: 10px;
}

.recording-status {
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
    display: none;
}

.recording-status.offline {
    display: block;
    color: #856404;
    padding: 5px;
    font-style: normal;
}

/* New item placeholder styles */
.new-reminder-item, .new-note-item {
    opacity: 0;
    height: 0;
    transition: opacity 0.3s, height 0.3s;
    overflow: hidden;
}

.new-reminder-item.active, .new-note-item.active {
    opacity: 1;
    height: auto;
}

/* Due date picker styles */
.due-date-actions {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.date-picker-container {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.date-picker-container.active {
    display: block;
}

.due-date-button {
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
}

.due-date-button:hover {
    background-color: #e9e9e9;
}

.edit-date-button {
    background: none;
    border: none;
    color: #2196F3;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.datetime-picker {
    margin-bottom: 10px;
    display: flex;
    column-gap: 6px;
}
.datetime-picker input {
    flex-grow: 1;
}

.date-action-buttons {
    display: flex;
    column-gap: 12px;
    align-items: flex-start;
}

/* Conversation delete button styles */
.conversation-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-conversation {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0 8px;
    line-height: 1;
}

.delete-conversation:hover {
    opacity: 1;
}

/* Bulk delete button styles */
.section-header .conversation-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.bulk-delete-button {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.bulk-delete-button:hover {
    background-color: #5a6268;
}

.bulk-delete-button.danger {
    background-color: #dc3545;
}

.bulk-delete-button.danger:hover {
    background-color: #c82333;
}