/* Student Portal Search Modal */

.egm-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.egm-search-modal-open {
    display: flex;
}

.egm-search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.egm-search-modal-content {
    position: relative;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    margin: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 10001;
}

.egm-search-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.egm-search-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.egm-search-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.egm-search-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.egm-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
}

.egm-search-prompt {
    padding: 32px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.egm-search-no-results {
    padding: 32px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.egm-search-error {
    padding: 16px;
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    font-size: 14px;
}

/* Results List */

.egm-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.egm-search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.egm-search-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px 0;
    border-bottom: 1px solid #eee;
}

/* Result Item */

.egm-search-result-item {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

.egm-search-result-item:hover {
    background-color: #f0f7ff;
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
}

.egm-search-result-item:active {
    background-color: #e8f0ff;
}

.egm-search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.egm-search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.egm-search-status-pending {
    font-size: 11px;
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    color: #b7a600;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.egm-search-status-completed {
    font-size: 11px;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.egm-search-in_progress {
    font-size: 11px;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #0050b3;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.egm-search-result-details {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    line-height: 1.4;
}

.egm-search-detail-label {
    font-weight: 600;
    color: #555;
}

.egm-search-score {
    font-size: 12px;
    color: #0050b3;
    font-weight: 500;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */

@media (max-width: 768px) {
    .egm-search-modal-content {
        width: 95%;
        max-height: 70vh;
    }

    .egm-search-modal-header {
        padding: 16px 20px;
    }

    .egm-search-modal-header h3 {
        font-size: 16px;
    }

    .egm-search-results {
        padding: 12px;
    }

    .egm-search-result-item {
        padding: 10px 12px;
    }

    .egm-search-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .egm-search-status-pending,
    .egm-search-status-completed {
        align-self: flex-start;
    }
}
