/* CodeKiste User Directories - Clean Minimal Styles */

.ck-user-directory {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
}

/* Header */
.ck-directory-header {
    background: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ck-directory-title h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.ck-school-name {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
    margin-top: 5px;
}

/* Filters */
.ck-directory-filters {
    padding: 15px 20px;
    background: #fafafa;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 15px;
    align-items: center;
}

.ck-search-box {
    display: flex;
    max-width: 300px;
}

.ck-search-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px 0 0 3px;
    font-size: 14px;
    outline: none;
}

.ck-search-input:focus {
    border-color: #007cba;
}

.ck-search-btn {
    padding: 8px 12px;
    background: #007cba;
    color: white;
    border: 1px solid #007cba;
    border-left: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

.ck-search-btn:hover {
    background: #005a87;
}

.ck-class-filter select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    min-width: 150px;
    outline: none;
}

.ck-class-filter select:focus {
    border-color: #007cba;
}

/* User List - Clean Table Style */
.ck-user-list {
    padding: 0;
    min-height: 200px;
}

.ck-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.ck-user-card {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.ck-user-card:hover {
    background-color: #f9f9f9;
}

.ck-user-card:last-child {
    border-bottom: none;
}

.ck-user-avatar {
    margin-right: 15px;
}

.ck-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.ck-user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ck-user-name {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    min-width: 200px;
}

.ck-user-meta {
    color: #666;
    font-size: 0.9rem;
}

.ck-user-actions {
    display: flex;
    gap: 8px;
}

/* Buttons - Simple and Clean */
.ck-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    transition: all 0.2s;
}

.ck-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.ck-btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.ck-btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

.ck-btn-primary {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.ck-btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.ck-btn-secondary {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.ck-btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
}

/* Pagination */
.ck-pagination {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: #fafafa;
}

.ck-pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.ck-pagination button:hover {
    background: #f5f5f5;
}

.ck-pagination button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.ck-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ck-pagination-info {
    color: #666;
    font-size: 0.9rem;
}

/* My Classes */
.ck-my-classes {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 20px 0;
}

.ck-classes-header {
    background: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.ck-classes-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.ck-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.ck-no-classes {
    padding: 40px;
    text-align: center;
    color: #666;
}

.ck-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
}

.ck-class-card {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    background: #fff;
}

.ck-class-card:hover {
    border-color: #007cba;
}

.ck-class-header {
    margin-bottom: 15px;
}

.ck-class-header h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.ck-student-count {
    color: #666;
    font-size: 0.9rem;
}

.ck-class-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Modal */
.ck-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ck-modal-content {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.ck-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.ck-modal-close:hover {
    color: #333;
}

/* Error styling */
.ck-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 3px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

/* Form styles */
.ck-form-group {
    margin-bottom: 15px;
}

.ck-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.ck-form-group input[type="text"],
.ck-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
}

.ck-form-group input[type="text"]:focus,
.ck-form-group select:focus {
    border-color: #007cba;
}

.ck-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Alert styles */
.ck-alert {
    padding: 10px 15px;
    border-radius: 3px;
    margin-top: 15px;
}

.ck-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ck-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ck-warning {
    color: #856404;
    background: #fff3cd;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #ffeaa7;
}

/* Responsive */
@media (max-width: 768px) {
    .ck-directory-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ck-directory-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .ck-search-box {
        max-width: none;
    }
    
    .ck-user-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .ck-user-info {
        flex-direction: column;
        gap: 5px;
    }
    
    .ck-user-actions {
        justify-content: center;
    }
    
    .ck-classes-grid {
        grid-template-columns: 1fr;
    }
    
    .ck-form-actions {
        flex-direction: column;
    }
    
    .ck-modal-content {
        width: 95%;
        margin: 0 10px;
    }
}