/* ==========================================================
   class-cards.css
   Shared styles: filter bar, filter tags, class cards.
   ========================================================== */


/* --- Filter Bar ----------------------------------------- */

.filter-bar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 6px 1px;
    margin-bottom: 2px;
}

.filter-bar .filter-col {
    padding: 0 2px;
}

.filter-bar .filter-select,
.filter-bar .filter-input {
    width: 100%;
    height: auto;
    font-size: 12px;
    padding: 4px 6px;
    margin-bottom: 4px;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.filter-bar .filter-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23555' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px 6px;
    cursor: pointer;
}

.filter-bar .filter-select:focus,
.filter-bar .filter-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .15);
    outline: none;
}

.filter-bar .filter-btn {
    font-size: 12px;
    padding: 5px 14px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-bar .btn-primary {
    color: #fff;
    background: #2563eb;
    border-color: #2563eb;
}
.filter-bar .btn-primary:hover {
    background: #1d4ed8;
}

.filter-bar .btn-secondary {
    color: #fff;
    background: #6c757d;
    border-color: #6c757d;
}
.filter-bar .btn-secondary:hover {
    background: #5a6268;
}


/* --- Filter Tags ---------------------------------------- */

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 0 4px;
    margin-top: 2px;
    border-top: 1px solid #eee;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 12px;
    white-space: nowrap;
}

.tag-city    { color: #059669; background: rgba(16, 185, 129, .08); border-color: #a7f3d0; }
.tag-format  { color: #0284c7; background: rgba(14, 165, 233, .08); border-color: #bae6fd; }
.tag-grade   { color: #7c3aed; background: rgba(168, 85, 247, .08); border-color: #ddd6fe; }
.tag-subject { color: #2563eb; background: rgba(37, 99, 235, .08);  border-color: #bfdbfe; }
.tag-salary  { color: #b45309; background: rgba(245, 158, 11, .08); border-color: #fde68a; }
.tag-gender  { color: #db2777; background: rgba(236, 72, 153, .08); border-color: #fbcfe8; }
.tag-search  { color: #374151; background: rgba(107, 114, 128, .08); border-color: #d1d5db; }

.tag-clear {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #d1d5db;
    font-weight: 600;
    text-decoration: none;
}
.tag-clear:hover {
    color: #374151;
    background: #e5e7eb;
}

.tag-remove {
    margin-left: 4px;
    color: #dc2626;
    font-size: 13px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
}
.tag-remove:hover {
    color: #991b1b;
}


/* --- Class Card ----------------------------------------- */

.class-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ddd;
    border-left: 2px solid #4c80f1;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fff;
    overflow: hidden;
}

.class-card-header {
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 28px;
    background: #0099ff;
    color: #fff;
}

.class-card-code {
    padding: 0 10px;
    font-weight: 700;
    white-space: nowrap;
}

.class-card-status {
    margin-left: auto;
    padding: 0 10px;
    font-weight: 700;
    white-space: nowrap;
}

.class-card-fee {
    flex: 1;
    padding: 0 8px;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-card-fee strong {
    color: #FFFF00;
    font-size: 13px;
}

.class-card-body {
    flex: 1;
    padding: 8px 10px 4px;
}

.class-card-title {
    margin: 0 0 6px;
    font-size: .85rem;
    font-weight: 700;
}

.class-details .detail-row {
    padding: 2px 0;
    font-size: .85rem;
    line-height: 1.4;
    border-bottom: 1px dashed #eee;
}

.class-details .detail-row:last-child {
    border-bottom: none;
}

.class-details .detail-row strong {
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    margin-right: 4px;
}

.class-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.class-card-btn {
    display: inline-block;
    padding: 3px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border-radius: 4px;
    text-decoration: none;
}

.class-card-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

.class-card-apps {
    font-size: 11px;
    color: #888;
}


/* --- Mobile --------------------------------------------- */

@media (max-width: 767.98px) {
    .filter-bar .filter-col {
        padding: 0 1px;
    }
}
