/* Student Search Widget Styles */
.student-search-form {
    position: relative;
    margin-bottom: 20px;
}

.student-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.student-search-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* Loading State */
.student-search-form.loading .search-icon:before {
    content: '\f463';
    display: inline-block;
    animation: rotation 2s infinite linear;
}

@keyframes rotation {
    from { transform: rotate(0deg); }
    to { transform: rotate(359deg); }
}

/* Student Cards */
.student-search-results {
    margin-top: 20px;
}

.student-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.student-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.student-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.student-avatar {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #eee;
}

.student-info {
    flex: 1;
}

.student-name {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.student-id {
    display: inline-block;
    background: #f0f0f1;
    color: #50575e;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
}

.student-details {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.detail-item {
    flex: 0 0 50%;
    margin-bottom: 8px;
    font-size: 13px;
}

.detail-label {
    font-weight: 600;
    color: #646970;
    margin-right: 5px;
}

.detail-value {
    color: #1d2327;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 20px;
    color: #646970;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .student-header {
        flex-direction: column;
        text-align: center;
    }
    
    .student-avatar {
        margin: 0 auto 10px;
    }
    
    .detail-item {
        flex: 0 0 100%;
    }
}

/* Modal styles for student details */
.sms-modal-open { overflow: hidden; }
#sms-student-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 9999; pointer-events: auto; }
.sms-student-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 10; }
.sms-student-modal-content { position: relative; background: #fff; padding: 20px; border-radius: 8px; max-width: 920px; width: 95%; max-height: 86vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,0.3); z-index: 20; pointer-events: auto; }
.sms-modal-close { position: absolute; right: 12px; top: 12px; border: 0; background: rgba(0,0,0,0.04); font-size: 22px; cursor: pointer; color: #333; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:6px; z-index:30; }
.sms-modal-close:hover { background: rgba(0,0,0,0.06); }
.sms-student-modal-body { padding-top: 8px; }

.sms-student-main { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.sms-student-photo { width: 96px; height: 96px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; background: #f8f8f8; display: flex; align-items: center; justify-content: center; color: #888; }
.sms-student-meta { flex: 1; }
.sms-student-meta h3 { margin: 0 0 6px; font-size: 20px; }
.sms-student-meta .sms-student-id { font-weight: 700; color: #333; }
.sms-student-meta .sms-student-sub { color: #666; margin-top: 6px; font-size: 13px; }

.sms-certificates-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.sms-cert-card { width: 180px; border: 1px solid #eee; border-radius: 6px; background: #fff; padding: 10px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.sms-cert-thumb { width: 140px; height: 90px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.sms-cert-title { font-weight: 600; font-size: 14px; color: #222; margin-bottom: 6px; }
.sms-cert-date { font-size: 12px; color: #666; margin-bottom: 8px; }
.sms-cert-action { display: inline-block; padding: 6px 10px; background: #0ea5ad; color: #fff; border-radius: 6px; text-decoration: none; font-size: 13px; }

@media (max-width: 640px) {
    .sms-student-main { flex-direction: column; align-items: center; text-align: center; }
    .sms-student-meta { text-align: center; }
    .sms-cert-card { width: 45%; }
}
