/* Tutor LMS Parent Dashboard - Frontend Styles */

/* ========================================
   PARENT DASHBOARD - MODERN CARD LAYOUT
   ======================================== */

/* Main Content Container */
.tlpd-dashboard-container {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
    position: relative;
}

.tlpd-dashboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(177, 18, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(177, 18, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(177, 18, 38, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.tlpd-page-header {
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(177, 18, 38, 0.2);
    position: relative;
    overflow: hidden;
}

.tlpd-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(177, 18, 38, 0.03) 0%, transparent 50%, rgba(177, 18, 38, 0.02) 100%);
    opacity: 0.3;
}

.tlpd-page-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.tlpd-page-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

/* ========================================
   BUTTON STYLING - CONSISTENT WITH BRAND
   ======================================== */

/* Override all Tutor LMS buttons in our dashboard to match brand */
.tlpd-dashboard-container .tutor-btn,
.tlpd-dashboard-container .tlpd-btn,
.tlpd-dashboard-container a[href*="student_id"],
.tlpd-dashboard-container a[href*="parent-dashboard"],
.tlpd-dashboard-container a[href*="parent-students"],
.tlpd-dashboard-container a[href*="parent-reports"] {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    min-width: 120px !important;
    line-height: 1.4 !important;
}

/* Add shimmer effect on hover */
.tlpd-dashboard-container .tutor-btn::before,
.tlpd-dashboard-container .tlpd-btn::before,
.tlpd-dashboard-container a[href*="student_id"]::before,
.tlpd-dashboard-container a[href*="parent-dashboard"]::before,
.tlpd-dashboard-container a[href*="parent-students"]::before,
.tlpd-dashboard-container a[href*="parent-reports"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

/* Hover effects */
.tlpd-dashboard-container .tutor-btn:hover,
.tlpd-dashboard-container .tlpd-btn:hover,
.tlpd-dashboard-container a[href*="student_id"]:hover,
.tlpd-dashboard-container a[href*="parent-dashboard"]:hover,
.tlpd-dashboard-container a[href*="parent-students"]:hover,
.tlpd-dashboard-container a[href*="parent-reports"]:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(177, 18, 38, 0.4) !important;
    color: #ffffff !important;
}

/* Shimmer animation on hover */
.tlpd-dashboard-container .tutor-btn:hover::before,
.tlpd-dashboard-container .tlpd-btn:hover::before,
.tlpd-dashboard-container a[href*="student_id"]:hover::before,
.tlpd-dashboard-container a[href*="parent-dashboard"]:hover::before,
.tlpd-dashboard-container a[href*="parent-students"]:hover::before,
.tlpd-dashboard-container a[href*="parent-reports"]:hover::before {
    left: 100%;
}

/* Focus states for accessibility */
.tlpd-dashboard-container .tutor-btn:focus,
.tlpd-dashboard-container .tlpd-btn:focus,
.tlpd-dashboard-container a[href*="student_id"]:focus,
.tlpd-dashboard-container a[href*="parent-dashboard"]:focus,
.tlpd-dashboard-container a[href*="parent-students"]:focus,
.tlpd-dashboard-container a[href*="parent-reports"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(177, 18, 38, 0.3) !important;
}

/* Active states */
.tlpd-dashboard-container .tutor-btn:active,
.tlpd-dashboard-container .tlpd-btn:active,
.tlpd-dashboard-container a[href*="student_id"]:active,
.tlpd-dashboard-container a[href*="parent-dashboard"]:active,
.tlpd-dashboard-container a[href*="parent-students"]:active,
.tlpd-dashboard-container a[href*="parent-reports"]:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.3) !important;
}

/* Specific override for ghost buttons */
.tlpd-dashboard-container .tutor-btn-ghost {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
}

.tlpd-dashboard-container .tutor-btn-ghost:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    border-color: #b11226 !important;
    transform: translateY(-3px) !important;
}

/* ========================================
   STUDENT SELECTOR - MODERN GRID LAYOUT
   ======================================== */

.tlpd-student-selector {
    max-width: 1200px;
    margin: 0 auto;
}

.tlpd-student-selector h2 {
    font-size: 28px;
    font-weight: 700;
    color: #b11226;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.tlpd-student-selector h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #b11226, #e74c3c);
    border-radius: 2px;
}

.tlpd-student-selector > p {
    text-align: center;
    color: #6c757d;
    margin-bottom: 35px;
    font-size: 17px;
    font-weight: 400;
}

/* Student Grid */
.tlpd-students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Student Card */
.tlpd-student-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.tlpd-student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b11226, #e74c3c);
    box-shadow: 0 2px 8px rgba(177, 18, 38, 0.3);
}

.tlpd-student-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(177, 18, 38, 0.15);
    border-color: #b11226;
}

.tlpd-student-card:hover::before {
    height: 6px;
    background: linear-gradient(90deg, #b11226, #e74c3c, #b11226);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.tlpd-student-avatar {
    margin-bottom: 20px;
}

.tlpd-student-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tlpd-student-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.tlpd-student-info p {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 0 15px 0;
}

.tlpd-student-actions .tutor-btn {
    background: linear-gradient(135deg, #b11226, #e74c3c);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.3);
}

.tlpd-student-actions .tutor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(177, 18, 38, 0.4);
}

/* No Students State */
.tlpd-no-students {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tlpd-no-students-icon {
    margin-bottom: 20px;
}

.tlpd-no-students-icon i {
    font-size: 64px;
    color: #bdc3c7;
}

.tlpd-no-students h3 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.tlpd-no-students p {
    color: #7f8c8d;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.tlpd-help-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tlpd-help-links .tutor-btn {
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* ========================================
   STUDENT DETAILS - MODERN LAYOUT
   ======================================== */

.tlpd-student-details {
    max-width: 1200px;
    margin: 0 auto;
}

/* Student Header Card */
.tlpd-student-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.tlpd-back-link {
    margin-bottom: 20px;
}

.tlpd-back-link a {
    color: #b11226;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.tlpd-back-link a:hover {
    color: #e74c3c;
}

.tlpd-student-profile {
    display: flex;
    align-items: center;
    gap: 25px;
}

.tlpd-student-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tlpd-student-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.tlpd-student-info p {
    color: #7f8c8d;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.tlpd-student-registered {
    color: #95a5a6 !important;
    font-size: 14px !important;
    font-style: italic;
}

/* Progress Stats Grid */
.tlpd-progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tlpd-progress-stat {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease;
}

.tlpd-progress-stat:hover {
    transform: translateY(-4px);
}

.tlpd-stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #b11226;
    margin-bottom: 8px;
}

.tlpd-stat-label {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Sections */
.tlpd-content-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.tlpd-content-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

/* Course Grid */
.tlpd-courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.tlpd-course-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tlpd-course-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.tlpd-course-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.tlpd-course-progress {
    margin-bottom: 20px;
}

.tlpd-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.tlpd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b11226, #e74c3c);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.tlpd-progress-text {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.tlpd-course-actions .tutor-btn {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    min-width: 120px !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Add shimmer effect on hover for course buttons */
.tlpd-course-actions .tutor-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tlpd-course-actions .tutor-btn:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(177, 18, 38, 0.4) !important;
    color: #ffffff !important;
}

/* Shimmer animation on hover for course buttons */
.tlpd-course-actions .tutor-btn:hover::before {
    left: 100%;
}

/* Focus states for course buttons */
.tlpd-course-actions .tutor-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(177, 18, 38, 0.3) !important;
}

/* Active states for course buttons */
.tlpd-course-actions .tutor-btn:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.3) !important;
}

/* Style any course links that might not have tutor-btn class */
.tlpd-course-actions a[href*="/courses/"],
.tlpd-courses-list a[href*="/courses/"] {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(177, 18, 38, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    min-width: 120px !important;
    line-height: 1.4 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.tlpd-course-actions a[href*="/courses/"]:hover,
.tlpd-courses-list a[href*="/courses/"]:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(177, 18, 38, 0.4) !important;
    color: #ffffff !important;
}

/* Quiz Attempts */
.tlpd-quizzes-list {
    display: grid;
    gap: 15px;
}

.tlpd-quiz-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tlpd-quiz-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.tlpd-quiz-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.tlpd-quiz-course {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 0 5px 0;
}

.tlpd-quiz-date {
    color: #95a5a6;
    font-size: 12px;
    margin: 0;
}

.tlpd-quiz-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.tlpd-quiz-score {
    font-weight: 600;
    color: #2c3e50;
}

.tlpd-quiz-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.tlpd-status-pass {
    background: #d4edda;
    color: #155724;
}

.tlpd-status-fail {
    background: #f8d7da;
    color: #721c24;
}

.tlpd-status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

/* Empty States */
.tlpd-content-section p:only-child {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 0;
}

/* ========================================
   STUDENTS MANAGEMENT TABLE
   ======================================== */

.tlpd-students-management {
    max-width: 1200px;
    margin: 0 auto;
}

.tlpd-students-management h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
}

.tlpd-students-table {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.tlpd-students-table .tutor-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tlpd-students-table .tutor-table th {
    background: #f8f9fa;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tlpd-students-table .tutor-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f8f9fa;
    vertical-align: middle;
}

.tlpd-students-table .tutor-table tr:hover {
    background: #f8f9fa;
}

.tlpd-student-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tlpd-student-cell img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #f8f9fa;
}

.tlpd-student-cell strong {
    color: #2c3e50;
    font-weight: 600;
}

.tlpd-student-cell small {
    color: #7f8c8d;
    font-size: 13px;
}

.tlpd-progress-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tlpd-progress-display span {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.tlpd-progress-display .tlpd-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.tlpd-progress-display .tlpd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b11226, #e74c3c);
}

/* Table button styling - ensure consistency */
.tlpd-students-management .tutor-btn,
.tlpd-students-management a[href*="student_id"],
.tlpd-students-table .tutor-btn,
.tlpd-students-table a[href*="student_id"] {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 12px rgba(177, 18, 38, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
    text-align: center !important;
    min-width: 100px !important;
    line-height: 1.3 !important;
}

.tlpd-students-management .tutor-btn:hover,
.tlpd-students-management a[href*="student_id"]:hover,
.tlpd-students-table .tutor-btn:hover,
.tlpd-students-table a[href*="student_id"]:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(177, 18, 38, 0.4) !important;
    color: #ffffff !important;
}

/* Specific override for ghost buttons in tables */
.tlpd-students-management .tutor-btn-ghost,
.tlpd-students-table .tutor-btn-ghost {
    background: linear-gradient(135deg, #b11226 0%, #e74c3c 100%) !important;
    color: #ffffff !important;
    border: 2px solid transparent !important;
}

.tlpd-students-management .tutor-btn-ghost:hover,
.tlpd-students-table .tutor-btn-ghost:hover {
    background: linear-gradient(135deg, #e74c3c 0%, #b11226 100%) !important;
    border-color: #b11226 !important;
    transform: translateY(-2px) !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .tlpd-dashboard-container {
        padding: 20px;
    }
    
    .tlpd-students-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tlpd-progress-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tlpd-courses-list {
        grid-template-columns: 1fr;
    }
    
    .tlpd-student-profile {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .tlpd-students-table {
        overflow-x: auto;
    }
    
    .tlpd-students-table .tutor-table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .tlpd-dashboard-container {
        padding: 15px;
    }
    
    .tlpd-page-header h1 {
        font-size: 24px;
    }
    
    .tlpd-student-card {
        padding: 20px;
    }
    
    .tlpd-content-section {
        padding: 20px;
    }
}
