/* Enhanced Child Profile Image Styles for Attendance Parent */
.child-avatar {
    flex-shrink: 0;
}

.child-avatar img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.alert-success .child-avatar img {
    border-color: #28a745;
}

.alert-warning .child-avatar img {
    border-color: #ffc107;
}

.alert-danger .child-avatar img {
    border-color: #dc3545;
}

.child-info {
    min-width: 0; /* Allows text truncation if needed */
}

.child-info h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.child-info p {
    font-size: 0.875rem;
    line-height: 1.3;
}

/* Enhanced dropdown item styling (if implementing image dropdown) */
.dropdown-list-item-enhanced {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
}

.dropdown-list-item-enhanced .item-avatar {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dee2e6;
}

.dropdown-list-item-enhanced .item-info {
    flex-grow: 1;
    min-width: 0;
}

.dropdown-list-item-enhanced .item-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.dropdown-list-item-enhanced .item-details {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Grade-grouped dropdown items */
.dropdown-child-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    margin-right: 6px;
}

.dropdown-child-avatar-placeholder {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e9ecef;
    vertical-align: middle;
    margin-right: 6px;
}

.dropdown-child-class {
    font-size: 0.8em;
    color: #6c757d;
    margin-left: 4px;
}

.dropdown-grade-header {
    display: block;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c757d;
    pointer-events: none;
}

#childSelector .dropdown-list-item:has(.dropdown-grade-header) {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.25rem 0.75rem;
    cursor: default;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .child-avatar img {
        width: 40px;
        height: 40px;
    }

    .dropdown-list-item-enhanced .item-avatar {
        width: 28px;
        height: 28px;
    }
}
