/* Tutor Certified Users - Styles */

.tcu-container {
    width: 100%;
    padding: 20px 0;
}

.tcu-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 0 auto;
}

.tcu-user-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.tcu-user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tcu-user-avatar {
    margin-bottom: 15px;
}

.tcu-user-avatar img {
    border-radius: 50%;
    border: 3px solid #f0f0f0;
}

.tcu-user-info {
    padding: 10px 0;
}

.tcu-user-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.tcu-certificate-count {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.tcu-view-certificates {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.tcu-view-certificates:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
}

.tcu-no-users {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Modal Styles */
.tcu-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.tcu-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tcu-modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tcu-modal-close {
    position: absolute;
    left: 20px;
    top: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tcu-modal-close:hover,
.tcu-modal-close:focus {
    background-color: #f0f0f0;
    color: #000;
}

.tcu-modal-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 25px 60px 25px 20px;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.tcu-modal-body {
    padding: 30px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

/* Certificates List */
.tcu-certificates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tcu-certificate-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid #667eea;
    transition: all 0.3s ease;
}

.tcu-certificate-item:hover {
    background: #f0f2f5;
    transform: translateX(-5px);
}

.tcu-certificate-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.tcu-certificate-icon svg {
    width: 28px;
    height: 28px;
}

.tcu-certificate-info {
    flex: 1;
}

.tcu-certificate-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tcu-quiz-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
}

.tcu-completion-date,
.tcu-grade {
    margin: 3px 0;
    font-size: 13px;
    color: #888;
}

.tcu-certificate-actions {
    flex-shrink: 0;
}

.tcu-download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tcu-download-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: scale(1.05);
}

/* Loading Spinner */
.tcu-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.tcu-loading::after {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    margin: 20px auto 0;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tcu-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .tcu-user-card {
        padding: 20px;
    }
    
    .tcu-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .tcu-modal-title {
        font-size: 18px;
        padding: 20px 50px 20px 15px;
    }
    
    .tcu-modal-body {
        padding: 20px 15px;
    }
    
    .tcu-certificate-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .tcu-certificate-actions {
        width: 100%;
    }
    
    .tcu-download-btn {
        width: 100%;
        text-align: center;
    }
}

/* RTL Support */
[dir="rtl"] .tcu-certificate-item {
    border-right: none;
    border-left: 4px solid #667eea;
}

[dir="rtl"] .tcu-certificate-item:hover {
    transform: translateX(5px);
}

[dir="rtl"] .tcu-modal-close {
    left: auto;
    right: 20px;
}

[dir="rtl"] .tcu-modal-title {
    padding: 25px 20px 25px 60px;
}

