/* Public CSS for Campus Recruitment Tracker */

/* Container */
.crt-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f5f7fa;
    padding: 20px;
    border-radius: 10px;
}

/* Filters */
.crt-filters {
    background-color: #ffffff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.crt-filters h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
    border-left: 4px solid #4d90fe;
    padding-left: 10px;
    font-weight: 600;
}

.crt-filter-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
}

.crt-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
    width: 100%;
    justify-content: flex-start;
}

.crt-filter-group {
    flex: 0 0 calc(16.666% - 10px); /* 默认一行6个筛选框 */
    min-width: 150px;
    max-width: none;
    position: relative;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.crt-filter-group label {
    display: none;
}

.crt-filter-group input {
    width: 100%;
    height: 42px;
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.crt-filter-group select {
    /* 中文字体优化 */
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    
    /* 尺寸设置 - 确保足够高度 */
    height: auto !important;
    min-height: 42px !important;
    padding: 8px 30px 8px 12px !important; /* 增加上下内边距 */
    
    /* 文本样式 */
    font-size: 14px !important;
    line-height: 1.4 !important; /* 增加行高比例 */
    color: #666 !important;
    
    /* 使用block布局，避免flex可能导致的问题 */
    display: block !important;
    
    /* 基本框属性 */
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    
    /* 修复外观 */
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px !important;
    
    /* 文本溢出处理 */
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    overflow: visible !important;
    
    /* 其他优化 */
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s;
}

/* 选中选项的颜色调整 */
.crt-filter-group select option {
    color: #333 !important; /* 选项文本颜色 */
    padding: 8px;
    font-size: 14px;
    line-height: 24px;
    min-height: 32px;
    background-color: white;
}

/* 修复Firefox在Windows上的显示问题 */
@-moz-document url-prefix() {
    .crt-filter-group select {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        height: 42px !important;
    }
}

/* 修复Safari/Chrome在macOS上的显示问题 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .crt-filter-group select {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        height: 42px !important;
    }
}

/* 修改选择框中选中文本的样式 */
.crt-filter-group select, 
.crt-filter-group select option:checked {
    font-size: 14px;
    font-weight: normal;
    color: #333;
}

/* 调整筛选框内文本字体大小 */
.crt-filter-group input::placeholder,
.crt-filter-group select {
    font-size: 14px;
    color: #333;
}

.crt-filter-group input:focus,
.crt-filter-group select:focus {
    border-color: #4d90fe;
    outline: none;
    box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.2);
}

.crt-filter-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
}

.crt-button {
    padding: 6px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    min-width: 70px;
}

.crt-filter-button {
    background-color: #4d90fe;
    color: white;
    min-width: 80px;
}

.crt-filter-button:hover {
    background-color: #3a7be0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.crt-reset-button {
    background-color: #f1f1f1;
    color: #555;
    min-width: 80px;
}

.crt-reset-button:hover {
    background-color: #e5e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 确保下拉菜单正确显示在非移动设备上 */
@media screen and (min-width: 769px) {
    .crt-filter-group select {
        min-width: 100%;
        box-sizing: border-box;
    }
}

/* 确保下拉菜单在移动设备上正确显示 */
@media screen and (max-width: 768px) {
    .crt-filter-group {
        min-width: 100%;
        max-width: 100%;
    }
    
    .crt-filter-group select {
        min-height: 40px; /* 在移动设备上进一步增加高度 */
    }
}

/* Table */
.crt-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.crt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.crt-table thead {
    background-color: #f8f9fa;
}

.crt-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    border-bottom: 1px solid #e0e0e0;
}

.crt-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.crt-table tbody tr.crt-row-hover,
.crt-table tbody tr:hover {
    background-color: #f0f7ff;
    transition: background-color 0.2s ease;
}

/* Table columns */
.crt-col-company {
    width: 15%;
    font-weight: 500;
}

.crt-col-type,
.crt-col-recruitment-type,
.crt-col-status {
    width: 8%;
}

.crt-col-location,
.crt-col-target {
    width: 10%;
}

.crt-col-position {
    width: 15%;
}

.crt-col-update-time,
.crt-col-deadline {
    width: 8%;
    white-space: nowrap;
}

.crt-col-links,
.crt-col-notes {
    width: 6%;
    text-align: center;
}

/* Badges */
.crt-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Company type badges */
.crt-type-央国企 {
    background-color: #e6f2ff;
    color: #0070f3;
}

.crt-type-国企 {
    background-color: #ebf4ff;
    color: #4589ff;
}

.crt-type-外企 {
    background-color: #f0fff4;
    color: #3eb34d;
}

.crt-type-民企 {
    background-color: #fffbeb;
    color: #f59e0b;
}

.crt-type-银行 {
    background-color: #fff3e0;
    color: #ed8936;
}

.crt-type-事业单位 {
    background-color: #f9f0ff;
    color: #9061f9;
}

.crt-type-制造业 {
    background-color: #e8f7ff;
    color: #0ca5e9;
}

/* Recruitment type badges */
.crt-recruitment-春招 {
    background-color: #fff0f6;
    color: #e84393;
}

.crt-recruitment-秋招 {
    background-color: #fff4e6;
    color: #fd7e14;
}

.crt-recruitment-日常实习 {
    background-color: #e6fcf5;
    color: #0ca678;
}

.crt-recruitment-暑假实习 {
    background-color: #e7f8ef;
    color: #38a169;
}

.crt-recruitment-秋招提前批 {
    background-color: #f8e7ff;
    color: #9c36b5;
}

.crt-recruitment-补录 {
    background-color: #f0e7ff;
    color: #805ad5;
}

.crt-recruitment-实习 {
    background-color: #e6fcf5;
    color: #0ca678;
}

/* Target candidates badges */
.crt-target-2025年毕业生 {
    background-color: #e7f5ff;
    color: #1c7ed6;
}
.crt-target-2026年毕业生 {
    background-color: #fff9db;
    color: #fab005;
}
.crt-target-2024和2025年毕业生,
.crt-target-2024-2025年毕业生 {
    background-color: #e3fafc;
    color: #0b7285;
}
.crt-target-其他 {
    background-color: #f8f9fa;
    color: #495057;
}

/* Status badges */
.crt-status-未投递 {
    background-color: #f1f3f5;
    color: #868e96;
}
.crt-status-已投递 {
    background-color: #e3faff;
    color: #0891b2;
}
.crt-status-已笔试 {
    background-color: #fff3bf;
    color: #e67700;
}
.crt-status-已面试 {
    background-color: #e7f5ff;
    color: #1971c2;
}
.crt-status-面试通过 {
    background-color: #d3f9d8;
    color: #37b24d;
}
.crt-status-暂不投递 {
    background-color: #fff0f6;
    color: #f06595;
}

/* Status selects */
.crt-status-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background-color: white;
}

.crt-status-select:focus {
    border-color: #4d90fe;
    outline: none;
}

/* Positions */
.crt-positions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.crt-position-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f0f7ff;
    border-radius: 3px;
    font-size: 12px;
    color: #4d90fe;
    border: 1px solid #d0e3ff;
}

/* Links */
.crt-link {
    display: inline-block;
    padding: 4px 12px;
    background-color: #4d90fe;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.2s;
}

.crt-link:hover {
    background-color: #3a7be0;
    color: white;
}

.crt-link.crt-notice-link {
    background-color: #37b24d;
}

.crt-link.crt-notice-link:hover {
    background-color: #2b9e3f;
}

/* Tooltips */
.crt-tooltip-trigger {
    display: inline-block;
    cursor: pointer;
    color: #4d90fe;
}

.crt-tooltip {
    position: absolute;
    max-width: 300px;
    padding: 10px 15px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.crt-tooltip:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #333 transparent transparent;
}

/* Notification */
.crt-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #4d90fe;
    color: white;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.crt-notification.crt-success {
    background-color: #37b24d;
}

.crt-notification.crt-error {
    background-color: #e03131;
}

/* 空状态 */
.crt-empty-state {
    text-align: center;
    padding: 40px 0;
    color: #777;
}

.crt-empty-state p {
    margin: 10px 0 0;
}

/* 序号列 */
.crt-col-number {
    width: 50px;
    text-align: center;
}

/* 移动设备表格样式 */
@media screen and (max-width: 768px) {
    .crt-filter-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .crt-filter-group {
        width: 100%;
    }
    
    .crt-table th,
    .crt-table td {
        padding: 8px;
        font-size: 13px;
    }
}

/* 更改布局方式以提供更多空间 */
@media screen and (min-width: 1200px) {
    .crt-filter-row {
        justify-content: flex-start;
    }
    
    .crt-filter-group {
        flex: 0 0 calc(25% - 15px);
        min-width: 180px;
        max-width: 240px;
    }
}

/* 更精细的响应式优化 */
@media screen and (min-width: 769px) and (max-width: 991px) {
    .crt-filter-group {
        flex: 1 1 calc(33.33% - 10px);
        min-width: 180px;
    }
}

@media screen and (min-width: 1500px) {
    .crt-filter-group {
        flex: 0 0 calc(20% - 12px); /* 超大屏幕显示5个一行 */
    }
    
    .crt-filter-form {
        max-width: 1400px;
        margin: 0 auto;
    }
}


/* 普通选择框样式重置 - 防止浏览器默认样式干扰 */
select {
    text-rendering: auto !important;
    word-spacing: normal !important;
    text-transform: none !important;
    text-indent: 0px !important;
    text-shadow: none !important;
    box-sizing: border-box !important;
}

/* 筛选选择框样式 - 修复文字高度显示问题 */

/* 基本媒体查询 - 更新每行显示4个筛选框 */
@media screen and (min-width: 992px) {
    .crt-filter-row > .crt-filter-group {
        flex: 0 0 calc(25% - 8px);
        min-width: 0;
    }
    
    .crt-filter-group.crt-filter-buttons {
        flex: 0 0 auto;
    }
}

/* 筛选按钮组特殊处理 */
.crt-filter-group.crt-filter-buttons {
    min-width: auto;
    max-width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
    margin: 0 auto;
    padding-top: 0;
}

.crt-filter-buttons .crt-button {
    padding: 0 15px;
    min-width: 60px;
    font-size: 14px;
    height: 42px; /* 与筛选框高度一致 */
    line-height: 42px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

/* 按钮悬停效果 */
.crt-filter-button:hover {
    background-color: #3a7be0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.crt-reset-button:hover {
    background-color: #e5e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* 超大屏幕布局优化 */
@media screen and (min-width: 1600px) {
    .crt-filter-form {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }
    
    .crt-filter-row {
        width: auto;
        flex: 1 1 auto;
    }
}

/* 确保强制每行显示的筛选框数量在更大屏幕上能放更多 */
@media screen and (min-width: 1400px) {
    .crt-filter-row > .crt-filter-group {
        flex: 0 0 calc(20% - 8px); /* 每行5个筛选框 */
    }
}

@media screen and (min-width: 1800px) {
    .crt-filter-row > .crt-filter-group {
        flex: 0 0 calc(16.666% - 8px); /* 每行6个筛选框 */
    }
}

/* 按钮行样式 */
.crt-filter-buttons-row {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

/* 登录限制模态框样式 */
.crt-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.crt-login-modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: crtFadeIn 0.3s ease-out;
}

@keyframes crtFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crt-login-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crt-login-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.crt-login-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.crt-login-modal-close:hover {
    color: #333;
}

.crt-login-modal-body {
    padding: 20px;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.crt-login-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.crt-login-button {
    display: inline-block;
    background-color: #4d90fe;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.crt-login-button:hover {
    background-color: #3a7be0;
    text-decoration: none;
    color: white;
}

/* 分页控件样式 */
.crt-pagination-container {
    margin: 20px 0;
    text-align: center;
}

.crt-pagination {
    display: inline-block;
}

.crt-pagination ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
}

.crt-pagination li {
    margin: 0 2px;
}

.crt-pagination .crt-page-link {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    color: #4d90fe;
    min-width: 40px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.crt-pagination .crt-page-link:hover {
    background-color: #f8f9fa;
    color: #3a7be0;
    border-color: #d0d0d0;
}

.crt-pagination li.active .crt-page-link {
    background-color: #4d90fe;
    color: white;
    border-color: #4d90fe;
    cursor: default;
}

.crt-pagination li.disabled .crt-page-link {
    color: #bbb;
    background-color: #f8f8f8;
    cursor: not-allowed;
}

/* 结果信息显示 */
.crt-results-info {
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
    padding: 8px 0;
} 


/* 新增在线人数显示样式 */
.crt-online-count {
    margin-left: 20px;
    font-weight: bold;
} 

.crt-page-jumper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    font-size: 14px;
}

.crt-page-jumper span {
    color: #666;
}

.crt-page-input {
    width: 48px;
    height: 32px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 14px;
    margin: 0 2px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.crt-page-input:focus {
    border-color: #4d90fe;
    box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.15);
}

.crt-page-go-btn {
    background: #4d90fe;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0 16px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-left: 2px;
    outline: none;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(77,144,254,0.04);
}

.crt-page-go-btn:hover, .crt-page-go-btn:focus {
    background: #2563eb;
    color: #fff;
} 