/* Toast notification system */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 100%;
    animation: slideIn 0.3s ease-out forwards;
}

.toast.success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.toast.error {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.dark .toast.success {
    background-color: #064e3b;
    color: #d1fae5;
}

.dark .toast.error {
    background-color: #7f1d1d;
    color: #fee2e2;
}

.toast-message {
    flex-grow: 1;
}

.toast-close {
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Page transitions */
.page-transition {
    transition: opacity 0.2s ease-in-out;
}

.page-transition.fade-out {
    opacity: 0;
}

/* Unique styles preserved after cleanup */
.card-badge {
    font-size: 0.7rem;
    /* Modified */
    padding: 0.1rem 0.35rem;
    /* Modified */
    border-radius: 9999px;
    font-weight: 500;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.5;
    }
}

/* Status dropdown styles */
.status-dropdown {
    position: relative;
}

.status-dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 180px;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    display: none;
}

.dark .status-dropdown-content {
    background-color: #1f2937;
}

.status-dropdown-content.active {
    display: block;
}

.status-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.status-option:first-child {
    border-top-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
}

.status-option:last-child {
    border-bottom-left-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.status-option:hover {
    background-color: #f3f4f6;
}

.dark .status-option:hover {
    background-color: #374151;
}

.status-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Job posting indicator */
.job-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 400;
    /* MODIFIED: No longer bold */
    background-color: #f3f4f6;
    /* MODIFIED: Lighter grey background */
    color: #4b5563;
}

.dark .job-indicator {
    background-color: #2d3748;
    /* MODIFIED: Lighter dark mode background */
    color: #d1d5db;
}


/* Timeline visualization */
.timeline-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.timeline-stage {
    display: flex;
    align-items: center;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
}

.timeline-line {
    height: 2px;
    width: 30px;
    background-color: #9ca3af;
    margin: 0 4px;
}

.timeline-label {
    font-size: 0.75rem;
    white-space: nowrap;
}

.timeline-date {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 2px;
}

.dark .timeline-date {
    color: #9ca3af;
}


/* Consolidated & Updated Kanban Styles */

/* Main kanban container */
.kanban-container {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem 0.25rem;
    min-height: calc(100vh - 200px);
    scrollbar-width: thin;
    gap: 1rem;
}

/* Individual kanban columns */
.kanban-column {
    flex: 1 1 280px;
    margin: 0 0.5rem;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    min-width: 250px;
}

/* Column headers */
.kanban-column-header {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Column bodies */
.kanban-column-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    min-height: 200px;
    max-height: calc(100vh - 250px);
}

/* Kanban cards */
/* Kanban cards */
.kanban-card {
    margin-bottom: 0.2rem;
    padding: 0.2rem 0.4rem;
    /* MODIFIED: Further reduced top and bottom padding */
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

/* Target the candidate's name */
.kanban-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

/* Target the job title text */
.kanban-card .job-indicator {
    font-size: 0.65rem;
    /* MODIFIED: A smidge smaller */
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

/* Target the container for the badges like "Phone ✓" */
.kanban-card .mt-2 {
    margin-top: 0.25rem;
}

/* Target the div that wraps the candidate name and action buttons */
.kanban-card .flex.justify-between {
    margin-bottom: 0.2rem;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Custom scrollbar for modern browsers */
.kanban-container::-webkit-scrollbar {
    height: 8px;
}

.kanban-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.kanban-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.kanban-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Empty column placeholder */
.empty-column-placeholder {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    margin: 0.5rem 0;
    color: rgba(0, 0, 0, 0.4);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .empty-column-placeholder {
        border-color: rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.4);
    }

    .kanban-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .kanban-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }

    .kanban-container::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Quill Editor Styling (Moved from index.html) */
.editor-container {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    min-height: 150px;
}

.dark .editor-container {
    background-color: #1e293b;
    border-color: #4b5563;
}

.dark .ql-toolbar {
    background-color: #2d3748;
    border-color: #4b5563;
    color: #e2e8f0;
}

.dark .ql-editor {
    background-color: #1e293b;
    color: #e2e8f0;
}

.dark .ql-picker-label {
    color: #e2e8f0;
}

.dark .ql-stroke {
    stroke: #e2e8f0;
}

.dark .ql-fill {
    fill: #e2e8f0;
}

.dark .ql-picker-options {
    background-color: #2d3748;
}

.dark .ql-picker-item {
    color: #e2e8f0;
}

.ql-editor {
    min-height: 150px;
    font-size: 1rem;
}

.rich-text-content ul {
    list-style-type: disc !important;
    padding-left: 2em;
    margin: 0.5em 0;
}

.rich-text-content ol {
    list-style-type: decimal !important;
    padding-left: 2em;
    margin: 0.5em 0;
}

.rich-text-content h1,
.rich-text-content h2,
.rich-text-content h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.rich-text-content p {
    margin-bottom: 0.5em;
}

.rich-text-content blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 16px;
    margin: 0.5em 0;
}

.dark .rich-text-content blockquote {
    border-left-color: #4b5563;
}

/* Styles for the interview mode resizer */
.interview-resizer {
    flex-shrink: 0;
    width: 6px;
    background-color: #e5e7eb;
    /* light gray */
    cursor: col-resize;
    transition: background-color 0.2s ease-in-out;
}

.interview-resizer:hover {
    background-color: #7E57C2;
    /* UPDATED: primary color */
}

.dark .interview-resizer {
    background-color: #374151;
    /* dark gray */
}

.dark .interview-resizer:hover {
    background-color: #9575CD;
    /* UPDATED: lighter primary */
}

/* ADDED: Styles for drag-and-drop */
.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.kanban-column-body.drag-over {
    border: 2px dashed #CDDC39;
    /* UPDATED: secondary accent color */
    background-color: rgba(205, 220, 57, 0.05);
    /* UPDATED */
}

.dark .kanban-column-body.drag-over {
    background-color: rgba(205, 220, 57, 0.1);
    /* UPDATED */
}

/* ADDED: SortableJS ghost class for styling the placeholder */
.sortable-ghost {
    opacity: 0.4;
    background: #f0f0f0;
    border: 1px dashed #ccc;
}

.dark .sortable-ghost {
    background: #2d3748;
    border-color: #4a5568;
}

/* ADDED: SortableJS drag class for styling the item being dragged */
.sortable-drag {
    opacity: 0.9;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dark .sortable-drag {
    background: #1a202c;
}

/* ADDED: Drag handle cursor */
.drag-handle {
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}


/* Styling for rendered rich text on public pages */
.prose ul {
    list-style-type: disc;
    padding-left: 1.625em;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.625em;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose li p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}


/*
 * Definitive Fix for Quill.js List Rendering
 * Forces list styling based on Quill's `data-list` attribute,
 * correcting for instances where Quill wraps bulleted lists in <ol> tags.
*/

/* Style any list containing bullet points as a bulleted list */
.rich-text-content ol li[data-list="bullet"],
.rich-text-content ul li[data-list="bullet"] {
    list-style-type: disc !important;
}

/* Ensure correctly-tagged unordered lists also get bullet points */
.rich-text-content ul li {
    list-style-type: disc;
}

/* Ensure ordered lists are always numbered */
.rich-text-content ol li[data-list="ordered"] {
    list-style-type: decimal !important;
}

/* Nested bullet styles */
.rich-text-content li[data-list="bullet"].ql-indent-1 {
    list-style-type: circle !important;
}

.rich-text-content li[data-list="bullet"].ql-indent-2 {
    list-style-type: square !important;
}

/* Quill Indentation Support */
.ql-indent-1 {
    margin-left: 3em;
}

.ql-indent-2 {
    margin-left: 6em;
}

.ql-indent-3 {
    margin-left: 9em;
}

.ql-indent-4 {
    margin-left: 12em;
}

.ql-indent-5 {
    margin-left: 15em;
}

.ql-indent-6 {
    margin-left: 18em;
}

.ql-indent-7 {
    margin-left: 21em;
}

.ql-indent-8 {
    margin-left: 24em;
}