/* Journey List and Detail Styles */

.journey-list-container,
.journey-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.journey-actions,
.events-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.journey-header h1 {
    margin: 0;
    color: #5d4e37;
}

/* Journey Info Grid */
.journey-info {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item-full {
    grid-column: 1 / -1;
}

.info-item label {
    font-weight: 600;
    color: #5d4e37;
    margin-bottom: 5px;
    font-size: 14px;
}

.info-item span {
    color: #7a6f5e;
    font-size: 16px;
}

/* Table Styles */
.journey-table-wrapper {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.1);
    margin-bottom: 20px;
    overflow-x: auto;
}

.journey-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.journey-table thead tr {
    background: #5d4e37;
    color: #faf6f0;
}

.journey-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #e8dcc8;
    border-right: 1px solid rgba(250, 246, 240, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journey-table th:last-child {
    border-right: none;
}

.journey-table td {
    padding: 10px;
    border-right: 1px solid #e8dcc8;
    border-bottom: 1px solid #e8dcc8;
    font-size: 13px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.journey-table td.truncate-cell {
    max-width: 0;
}

.journey-table td:last-child {
    border-right: none;
}

.journey-table tbody tr:last-child td {
    border-bottom: none;
}

.journey-table tbody tr:hover {
    background-color: #faf6f0;
}

/* Column widths for journey list */
.journey-table .col-status  { width: 110px; }
.journey-table .col-title   { width: 20%; }
.journey-table .col-company { width: 16%; }
.journey-table .col-salary  { width: 12%; }
.journey-table .col-person  { width: 14%; }
.journey-table .col-date    { width: 90px; }
.journey-table .col-actions { width: 100px; }

.actions-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

.actions-cell .btn,
.actions-cell form,
.actions-cell form .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin: 0;
}

.muted { color: #aaa; font-style: normal; }

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* Events table (still uses the old grid approach) */
.events-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.1);
    margin-bottom: 20px;
}

.full-notes{
    display: none;
}

.events-table .table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 2fr;
    background: #5d4e37;
    color: #faf6f0;
    font-weight: 600;
}

.events-table .table-cell{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    height: 100%;
}

.events-table .header-cell{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-cell {
    padding: 12px 10px;
    text-align: left;
    border-right: 1px solid rgba(250, 246, 240, 0.2);
    color: #e8dcc8;
    font-size: 13px;
}

.header-cell:last-child {
    border-right: none;
}

.table-row {
    display: grid;
    border-bottom: 1px solid #e8dcc8;
    transition: background-color 0.2s ease;
}

.events-table .table-row {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 2fr;
    max-height: 300px;
}

.table-row:hover {
    background-color: #faf6f0;
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 10px;
    border-right: 1px solid #e8dcc8;
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.table-cell:last-child {
    border-right: none;
}

/* Status Badges */
.status-badge,
.event-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-new { background: #e3f2fd; color: #1976d2; }
.status-recruiter { background: #f3e5f5; color: #7b1fa2; }
.status-candidate { background: #e8f5e8; color: #388e3c; }
.status-applied { background: #fff3e0; color: #f57c00; }
.status-interview { background: #e1f5fe; color: #0277bd; }
.status-offer { background: #e8f5e8; color: #2e7d32; }
.status-hired { background: #e8f5e8; color: #1b5e20; }
.status-rejected { background: #ffebee; color: #c62828; }
.status-no_response { background: #fafafa; color: #424242; }
.status-no_interest { background: #fff8e1; color: #f9a825; }
.status-in_progress { background: #e3f2fd; color: #1565c0; }
.status-on_hold { background: #fff3e0; color: #ef6c00; }

/* Event Badges */
.event-new { background: #e3f2fd; color: #1976d2; }
.event-recruiter { background: #f3e5f5; color: #7b1fa2; }
.event-candidate { background: #e8f5e8; color: #388e3c; }
.event-applied { background: #fff3e0; color: #f57c00; }
.event-interview { background: #e1f5fe; color: #0277bd; }
.event-offer { background: #e8f5e8; color: #2e7d32; }
.event-hired { background: #e8f5e8; color: #1b5e20; }
.event-rejected { background: #ffebee; color: #c62828; }
.event-no_response { background: #fafafa; color: #424242; }
.event-no_interest { background: #fff8e1; color: #f9a825; }
.event-in_progress { background: #e3f2fd; color: #1565c0; }
.event-on_hold { background: #fff3e0; color: #ef6c00; }

/* Related Items */
.related-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Job Details */
.info-item a {
    color: #1976d2;
    text-decoration: none;
    word-break: break-all;
}

.info-item a:hover {
    text-decoration: underline;
}

.salary-info {
    font-weight: 600;
    color: #2e7d32;
}

.related-link {
    display: inline-block;
    padding: 4px 8px;
    background: #5d4e37;
    color: #faf6f0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.related-link:hover {
    background: #7a6f5e;
    color: #faf6f0;
}

.email-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.email-link {
    display: inline-block;
    padding: 4px 8px;
    background: #2c5f74;
    color: #faf6f0;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.2s ease;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-link:hover {
    background: #3d7b94;
    color: #faf6f0;
    text-decoration: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.1);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls label {
    font-weight: 600;
    color: #5d4e37;
}

.pagination-controls select {
    padding: 8px 12px;
    border: 1px solid #e8dcc8;
    border-radius: 4px;
    background: #fff;
    color: #5d4e37;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: #5d4e37;
    color: #faf6f0;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.page-link:hover {
    background: #7a6f5e;
    color: #faf6f0;
}

.current-page {
    font-weight: 600;
    color: #5d4e37;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    white-space: nowrap;
    vertical-align: middle;
}

.journey-action-form {
    display: contents;
}

.btn-primary {
    background: #5d4e37;
    color: #faf6f0;
}

.btn-primary:hover {
    background: #7a6f5e;
    color: #faf6f0;
}

.btn-secondary {
    background: #7a6f5e;
    color: #faf6f0;
}

.btn-secondary:hover {
    background: #8b7355;
    color: #faf6f0;
}

/* Events Section */
.events-section h2 {
    color: #5d4e37;
    margin-bottom: 20px;
}

.k-window{
    z-index: 100004;
}
.k-overlay{
    z-index: 100003;
}

.no-events,
.no-journeys {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(93, 78, 55, 0.1);
}

.no-events p,
.no-journeys p {
    color: #7a6f5e;
    font-size: 16px;
    margin: 0;
}

.demo-actions {
    margin-top: 20px;
    text-align: center;
}

.demo-actions p {
    margin-bottom: 15px;
    color: #5d4e37;
    font-weight: 600;
}

/* Hidden Popup */
.hidden-popup {
    display: none;
}

/* Hidden Modal */
.hidden-modal {
    display: none;
}

/* Modal Styles */
.modal-content {
    padding: 20px;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #5d4e37;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #5d4e37;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8dcc8;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #8b7355;
    box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.25);
    outline: none;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8dcc8;
}

.form-actions .btn {
    padding: 8px 18px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    box-sizing: border-box;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}

.event-contextual-fields {
    display: none;
}

/* Error Container */
.error-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.error-container h1 {
    color: #c62828;
    margin-bottom: 20px;
}

.error-container p {
    color: #7a6f5e;
    font-size: 18px;
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .journey-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;

    }
    
    .events-table .table-header,
    .events-table .table-row {
        grid-template-columns: 1fr; 

    }
    
    .header-cell,
    .table-cell {
        border-right: none;
        border-bottom: 1px solid #e8dcc8;
        text-overflow: ellipsis !important;
        padding: 5 10 5 10;
        width: 80px;
        color: #e8dcc8;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Hidden modal style */
.hidden-modal {
    display: none;
}

/* Clickable notes styles */
.clickable-notes {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}

.clickable-notes:hover {
    background-color: #f0f8ff;
    border: 1px solid #007bff;
    color: #007bff;
}

.clickable-notes.no-notes:hover {
    background-color: #f8f9fa;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.clickable-notes::after {
    content: " ✏️";
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.clickable-notes:hover::after {
    opacity: 1;
}

/* Notes edit modal styles */
#notesEditModal .modal-content {
    padding: 20px;
}

#notesEditModal .form-group {
    margin-bottom: 15px;
}

#notesEditModal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#notesEditModal .form-actions {
    margin-top: 20px;
    text-align: right;
}

#notesEditModal .form-actions .btn {
    margin-left: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#notesEditModal .btn-primary {
    background-color: #007bff;
    color: white;
}

#notesEditModal .btn-primary:hover {
    background-color: #0056b3;
}

#notesEditModal .btn-secondary {
    background-color: #6c757d;
    color: white;
}

#notesEditModal .btn-secondary:hover {
    background-color: #545b62;
}

/* Archive / restore buttons */
.btn-archive {
    background: #6c757d;
    color: #fff;
}

.btn-archive:hover {
    background: #545b62;
    color: #fff;
}

.btn-unarchive {
    background: #28a745;
    color: #fff;
}

.btn-unarchive:hover {
    background: #218838;
    color: #fff;
}

/* Archived banner / badge */
.journey-archived-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 13px;
    color: #856404;
    margin-bottom: 16px;
}

.journey-archived-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 12px;
    font-size: 12px;
    color: #856404;
    font-weight: 600;
}

.existing-journey-select{
    min-width: 200px;
    max-width: 300px !important;
}
.journey-controls{
    width: 350px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

.journey-field-readonly {
    background-color: #f5f5f5 !important;
    color: #6c757d !important;
    cursor: not-allowed;
}