/* Interactive Jobs Table - Main Styles */

/* Table Container */
.interactive-jobs-table-wrapper {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.interactive-post-table-container {
    margin: 20px 0;
    overflow: hidden;
}

/* DataTable Styling */
.ipt-datatable {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100% !important;
}

.ipt-datatable thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 10px;
    border: none;
    text-align: left;
}

.ipt-datatable tbody td {
    padding: 14px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.ipt-datatable tbody tr {
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

.ipt-datatable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.ipt-datatable tbody tr:hover {
    background-color: #f8f9ff;
}

.ipt-datatable tbody tr.sticky-post {
    background-color: #fff5f5;
}

.ipt-datatable tbody tr.sticky-post:hover {
    background-color: #ffe5e5;
}

/* Column Widths */
.ipt-col-job-title {
    width: 55%;
    min-width: 450px;
}

.ipt-col-job-type {
    width: 20%;
    min-width: 150px;
}

.ipt-col-posted-date {
    width: 15%;
    min-width: 120px;
}

.ipt-col-apply {
    width: 10%;
    min-width: 80px;
}

/* Job Title Cell */
.ipt-job-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.ipt-job-link {
    color: #2d3748;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ipt-job-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.ipt-job-link.sticky-title {
    color: #dc2626;
    font-weight: 600;
}

.ipt-title-action-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Badges */
.ipt-job-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.ipt-badge {
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

.ipt-hot-job-badge {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.ipt-new-job-badge {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

/* Job Type Cell */
.ipt-job-type-cell {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;
}

/* Date Cell */
.ipt-date-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ipt-post-date {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
}

.ipt-new-job-time {
    font-size: 11px;
    color: #38a169;
    font-weight: 600;
    font-style: italic;
}

/* Apply Button */
.ipt-apply-now-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 90px;
    width: 100%;
    box-sizing: border-box;
}

.ipt-apply-now-button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    color: white;
    text-decoration: none;
}

/* No Jobs Message */
.ipt-no-jobs {
    text-align: center;
    padding: 40px !important;
    color: #6b7280;
    font-style: italic;
}

/* Modal Styles */
.ipt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ipt-modal.active {
    opacity: 1;
    visibility: visible;
}

.ipt-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

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

.ipt-modal-header h3 {
    margin: 0;
    color: #4f46e5;
    font-size: 24px;
    font-weight: 600;
}

.ipt-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.ipt-modal-close:hover {
    color: #dc2626;
}

.ipt-modal-body {
    margin-bottom: 30px;
}

.ipt-modal-message {
    font-size: 18px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 20px 0;
}

.ipt-social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ipt-social-links span {
    font-weight: 500;
    color: #4b5563;
}

.ipt-social-links a {
    display: inline-block;
    transition: transform 0.2s ease;
}

.ipt-social-links a:hover {
    transform: scale(1.1);
}

.ipt-social-links img {
    border-radius: 4px;
    vertical-align: middle;
}

.ipt-review-link {
    font-size: 15px;
    color: #374151;
    margin: 20px 0 0 0;
}

.ipt-review-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.ipt-review-link a:hover {
    color: #4338ca;
    text-decoration: underline;
}

.ipt-modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.ipt-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-width: 100px;
}

.ipt-btn-primary {
    background: #4f46e5;
    color: white;
}

.ipt-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ipt-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.ipt-btn-secondary:hover {
    background: #e5e7eb;
}

/* DataTable Customizations */
.dataTables_wrapper {
    margin-top: 20px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 10px 0;
    font-size: 13px;
    color: #6b7280;
}

.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    margin-left: 10px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #4f46e5;
    color: white !important;
    border-color: #4f46e5;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #4f46e5;
    color: white !important;
    border-color: #4f46e5;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .ipt-col-job-title {
        min-width: 350px;
    }
    
    .ipt-col-job-type {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .interactive-post-table-container {
        margin: 10px 0;
    }
    
    .ipt-datatable {
        display: block;
        overflow-x: auto;
    }
    
    .ipt-col-job-title,
    .ipt-col-job-type,
    .ipt-col-posted-date,
    .ipt-col-apply {
        min-width: 120px;
    }
    
    .ipt-job-title-line {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .ipt-job-link {
        font-size: 14px;
        width: 100%;
        order: 1;
    }
    
    .ipt-title-action-container {
        width: 100%;
        justify-content: flex-start;
        order: 2;
    }
    
    .ipt-apply-now-button {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 70px;
    }
    
    .ipt-modal-content {
        padding: 20px;
    }
    
    .ipt-modal-header h3 {
        font-size: 20px;
    }
    
    .ipt-modal-message {
        font-size: 16px;
    }
    
    .ipt-social-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-top: 10px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        max-width: 300px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .ipt-datatable thead th {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .ipt-datatable tbody td {
        padding: 10px 8px;
    }
    
    .ipt-modal-content {
        padding: 15px;
        width: 95%;
    }
    
    .ipt-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .ipt-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .ipt-modal,
    .ipt-apply-now-button,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate {
        display: none !important;
    }
    
    .ipt-datatable {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .ipt-datatable thead th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
    }
}