/* University Course Manager - Premium Listing Styles */

.ucm-listing-container {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 25px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.ucm-listing-container * {
    box-sizing: border-box;
}

.ucm-search-header-box {
    margin-bottom: 35px;
    width: 100%;
}

.ucm-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.ucm-search-input-wrapper:focus-within {
    border-color: #0369a1;
    box-shadow: 0 15px 35px -5px rgba(3, 105, 161, 0.15);
    transform: translateY(-2px);
}

.ucm-search-input-wrapper .dashicons-search {
    position: absolute;
    left: 20px;
    color: #64748b;
    font-size: 22px;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

#ucm-uni-main-search {
    width: 100%;
    padding: 16px 55px 16px 55px;
    border: none !important;
    background: transparent !important;
    font-family: 'Poppins';
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    box-shadow: none !important;
    outline: none !important;
}

#ucm-uni-main-search::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.ucm-clear-uni-search {
    position: absolute;
    right: 20px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: 0.2s;
    display: none;
}

.ucm-clear-uni-search:hover {
    color: #ef4444;
}

#results-count {
    margin-top: 15px;
    margin-left: 5px;
    font-weight: 700;
    color: #64748b;
    font-size: 13px;
    font-family: 'Poppins';
    display: flex;
    align-items: center;
    gap: 8px;
}

#results-count::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

#ucm-uni-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: -5px;
}

.ucm-suggestion-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    color: #1e293b;
}

.ucm-suggestion-item:hover {
    background: #f0f9ff;
    color: #0369a1;
    font-weight: 600;
    padding-left: 25px;
}

.ucm-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    z-index: 90;
    padding-right: 5px;
    width: 100%;
}

.filter-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
    transition: 0.3s;
}

.filter-section {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-section label.head {
    display: block;
    font-weight: 800;
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.filter-section select,
.filter-section input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-list label {
    font-size: 13px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ucm-mobile-action-bar {
    position: sticky !important;
    top: 0 !important;
    left: 0;
    width: 100%;
    background: #fff;
    display: none;
    z-index: 1000 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e2e8f0;
    height: 48px;
    align-items: stretch;
    margin-bottom: 15px;
}

.ucm-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: none;
    border: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.ucm-action-btn:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    height: 24px;
    width: 1px;
    background: #e2e8f0;
}

.ucm-action-btn .dashicons {
    font-size: 18px;
    color: #64748b;
}

.ucm-sort-modal {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: #fff;
    z-index: 10003;
    transition: 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}

.ucm-sort-modal.active {
    bottom: 0;
}

.ucm-sort-option {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ucm-sort-option.selected {
    color: #0369a1;
    font-weight: 700;
}

.ucm-sort-option.selected::after {
    content: '✓';
    font-weight: 800;
}

.ucm-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(4px);
}

.ucm-main-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ucm-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.uni-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: 'Poppins', sans-serif;
    overflow: hidden !important;
}

.uni-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: #bae6fd;
}

.uni-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    color: #f59e0b;
    font-size: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.uni-card-img {
    height: 180px;
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.uni-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.uni-card:hover .uni-card-img img {
    transform: scale(1.05);
}

.uni-card-body {
    padding: 20px;
    flex-grow: 1;
}

.uni-card-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.3;
    color: #0f172a;
}

.uni-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: 0.2s;
}

.uni-meta-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 15px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 20px;
}

.uni-meta-mini span {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uni-meta-mini .dashicons {
    font-size: 16px;
    color: #0369a1;
}

.stat-highlight {
    color: #0f172a;
    font-weight: 600;
}

.uni-course-snapshot {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    position: relative;
}

.snap-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.snap-slider-container {
    position: relative;
    display: flex;
    align-items: center;
}

.snap-pills-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 5px 35px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.snap-pills-scroll::-webkit-scrollbar {
    display: none;
}

.course-pill {
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.course-pill:hover {
    background: #0369a1;
    color: #fff !important;
    border-color: #0369a1;
    transform: translateY(-2px);
}

.snap-arrow {
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    color: #0369a1;
    top: 50%;
    transform: translateY(-50%);
}

.snap-arrow.prev {
    left: 0;
}

.snap-arrow.next {
    right: 0;
}

.uni-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid #f1f5f9;
}

.btn-card {
    padding: 16px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: 0.2s;
}

.btn-view {
    background: #f8fafc;
    color: #64748b;
}

.btn-view:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.btn-claim {
    background: #f8fafc;
    color: #64748b;
}

.btn-claim:hover {
    background: #ef4444;
    color: #fff;
}

.btn-compare-row {
    background: #0369a1;
    color: #fff;
}

.btn-compare-row:hover {
    background: #0284c7;
}

@media (max-width: 992px) {
    .ucm-listing-container {
        grid-template-columns: 1fr;
        padding: 0 15px 40px;
    }

    .ucm-mobile-action-bar {
        display: flex;
    }

    .ucm-sidebar {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        height: 85vh;
        background: #fff;
        z-index: 10002;
        transition: 0.5s;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 25px 25px;
    }

    .ucm-sidebar.active {
        top: 0;
    }

    .admin-bar .ucm-sidebar.active {
        top: 32px;
    }
}