/**
 * Tutor LMS Frontend Font Size Fixes
 * This file increases small font sizes to improve readability
 * while keeping all functionality intact
 */

/* ===================================
   BASE FONT SIZE IMPROVEMENTS 
   =================================== */

/* Increase base font sizes for better readability */
:root {
    --tutor-text-size: 16px; /* Keep standard size */
}

/* ===================================
   CORE TEXT SIZE FIXES 
   =================================== */

/* Fix very small text sizes */
.text-regular-tiny,
.tutor-text-regular-tiny {
    font-size: 14px !important; /* Increased from 11px */
    line-height: 150% !important;
}

.text-regular-small,
.tutor-text-regular-small,
.text-body {
    font-size: 15px !important; /* Increased from 13px */
    line-height: 150% !important;
}

.text-regular-caption,
.tutor-text-regular-caption {
    font-size: 16px !important; /* Increased from 15px */
    line-height: 160% !important;
}

/* Medium weight text improvements */
.text-medium-tiny,
.tutor-text-medium-tiny {
    font-size: 14px !important; /* Increased from 11px */
    line-height: 150% !important;
}

.text-medium-small,
.tutor-text-medium-small {
    font-size: 15px !important; /* Increased from 13px */
    line-height: 165% !important;
}

.text-medium-caption,
.tutor-text-medium-caption {
    font-size: 16px !important; /* Increased from 15px */
    line-height: 165% !important;
}

/* Semi-bold text improvements */
.text-semi-small,
.tutor-text-semi-small {
    font-size: 15px !important; /* Increased from 13px */
    line-height: 140% !important;
}

.text-semi-caption,
.tutor-text-semi-caption {
    font-size: 16px !important; /* Increased from 15px */
    line-height: 170% !important;
}

/* Bold text improvements */
.text-bold-small,
.tutor-text-bold-small {
    font-size: 15px !important; /* Increased from 13px */
    line-height: 165% !important;
}

.text-bold-tiny,
.tutor-text-bold-tiny {
    font-size: 14px !important; /* Increased from 11px */
    line-height: 150% !important;
}

.text-bold-caption,
.tutor-text-bold-caption {
    font-size: 16px !important; /* Increased from 15px */
    line-height: 165% !important;
}

/* ===================================
   BUTTON TEXT IMPROVEMENTS 
   =================================== */

.text-btn-small,
.tutor-text-btn-small {
    font-size: 15px !important; /* Increased from 13px */
    line-height: 140% !important;
}

.text-btn-medium,
.tutor-text-btn-medium {
    font-size: 16px !important; /* Increased from 15px */
    line-height: 165% !important;
}

/* ===================================
   COURSE CONTENT IMPROVEMENTS 
   =================================== */

/* Course lesson and topic text */
.tutor-course-topics-contents h4,
.tutor-course-lesson h5,
.tutor-course-lesson h5 a {
    font-size: 16px !important; /* Ensure readable size */
    line-height: 140% !important;
}

/* Course meta information */
.tutor-course-avg-rating-total,
.rating-total-meta,
.tutor-color-muted small,
.tutor-course-lesson h5 .tutor-lesson-duration {
    font-size: 14px !important; /* Increased from smaller sizes */
    line-height: 140% !important;
}

/* Course review text */
.tutor-review-individual-item .review-meta,
.tutor-review-individual-item .tutor-review-user-info p {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* ===================================
   FORM AND INPUT IMPROVEMENTS 
   =================================== */

.tutor-form-group label,
.tutor-option-field-row label {
    font-size: 15px !important;
    line-height: 140% !important;
}

.tutor-form-group input,
.tutor-form-group textarea,
.tutor-option-field input,
.tutor-option-field textarea,
.tutor-form-group select {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   TABLE AND LIST IMPROVEMENTS 
   =================================== */

table.tutor-table td,
table.tutor-table th,
table.course-single-gradebooks td,
table.course-single-gradebooks th {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   QUIZ AND ASSIGNMENT IMPROVEMENTS 
   =================================== */

.tutor-quiz-builder-group input,
.tutor-quiz-builder-group textarea,
.tutor-quiz-builder-group select,
.tutor-quiz-wrapper .quiz-question-ans-choice-area label,
.quiz-question-ans-choice-area .quiz-question-ans-choice label {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* Quiz answer choices */
.tutor-quiz-question-item label,
.quiz-question-ans-choice label {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   NAVIGATION AND MENU IMPROVEMENTS 
   =================================== */

.tutor-course-enrolled-nav ul li a,
.course-enrolled-nav-wrap .course-enrolled-nav ul li a {
    font-size: 16px !important;
    line-height: 140% !important;
}

/* Sidebar navigation */
.tutor-course-single-sidebar-wrapper .tutor-course-topic-item-title {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   DASHBOARD IMPROVEMENTS 
   =================================== */

.tutor-dashboard-content p,
.tutor-dashboard-content span,
.tutor-dashboard-content small,
.tutor-dashboard-content .datetime {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* Dashboard tables */
.tutor-dashboard-assignment-submitted-table tr td,
.tutor-dashboard-assignment-submitted-table tr th {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* ===================================
   INSTRUCTOR AND PROFILE IMPROVEMENTS 
   =================================== */

.instructor-name h4,
.tutor-instructor-left .instructor-name span,
.single-instructor-wrap .instructor-name h4 {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* Instructor cards and bios */
.single-instructor-wrap .single-instructor-bottom .courses,
.single-instructor-wrap .single-instructor-bottom .students {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* ===================================
   COMMENT AND DISCUSSION IMPROVEMENTS 
   =================================== */

.tutor-conversation .tutor-comment-textarea,
.tutor-conversation .tutor-actual-comment,
.tutor-qna-single-question .tutor-qa-reply textarea {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* Q&A improvements */
table.qna-list-table .tutor-qna-question-col small,
.tutor-qna-single-question .tutor-qna-chat p {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* ===================================
   COURSE LISTING IMPROVEMENTS 
   =================================== */

.tutor-course-loop-price,
.tutor-course-loop-rating,
.list-item-price,
.tutor-course-loop-meta {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* Course cards */
.tutor-course-card .tutor-course-name,
.tutor-course-card .tutor-course-meta {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   NOTIFICATION AND MESSAGE IMPROVEMENTS 
   =================================== */

.tutor-alert,
.tutor-info-msg,
.tutor-success-msg,
.tutor-warning-msg,
.tutor-error-msg,
.tutor-notice-warning {
    font-size: 15px !important;
    line-height: 140% !important;
}

/* ===================================
   SPECIFIC SMALL TEXT FIXES 
   =================================== */

/* Ensure minimum font size for commonly small elements */
.datetime,
.review-meta,
.tutor-color-hints,
.tutor-color-muted,
.submitted-assignment-grade-pass,
.submitted-assignment-grade-failed,
.received-marks {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* Grade and status labels */
.gradename-bg,
.gradename-outline,
.text-label,
.label-order-status {
    font-size: 14px !important;
    line-height: 140% !important;
}

/* ===================================
   MOBILE RESPONSIVENESS 
   =================================== */

@media (max-width: 768px) {
    .text-regular-tiny,
    .tutor-text-regular-tiny,
    .text-regular-small,
    .tutor-text-regular-small,
    .text-body {
        font-size: 15px !important;
        line-height: 150% !important;
    }
    
    .text-regular-caption,
    .tutor-text-regular-caption {
        font-size: 16px !important;
        line-height: 155% !important;
    }
    
    /* Increase minimum font size on mobile */
    .tutor-wrap * {
        font-size: 15px !important;
    }
    
    /* Specific mobile improvements */
    .tutor-course-lesson h5,
    .tutor-course-topics-contents h4 {
        font-size: 16px !important;
        line-height: 140% !important;
    }
}

@media (max-width: 480px) {
    /* Ensure all text is readable on very small screens */
    .tutor-wrap,
    .tutor-wrap * {
        font-size: 15px !important;
        line-height: 145% !important;
    }
    
    /* Headers and important text */
    h1, h2, h3, h4, h5, h6,
    .tutor-course-name,
    .tutor-lesson-title {
        font-size: 16px !important;
        line-height: 140% !important;
    }
}

/* ===================================
   ENSURE OVERRIDE PRIORITY 
   =================================== */

/* Ensure our font fixes have priority over theme styles */
body .tutor-wrap,
body.tutor-frontend .tutor-wrap {
    font-size: inherit;
}

body .tutor-wrap p,
body .tutor-wrap span,
body .tutor-wrap div,
body .tutor-wrap a,
body .tutor-wrap label,
body .tutor-wrap input,
body .tutor-wrap textarea {
    font-size: inherit;
}

/* Final catch-all for any remaining small text */
.tutor-wrap *[style*="font-size: 11px"],
.tutor-wrap *[style*="font-size: 12px"],
.tutor-wrap *[style*="font-size: 13px"] {
    font-size: 15px !important;
}

/* ===================================
   HIGH PRIORITY OVERRIDES 
   =================================== */

/* Ensure our styles override theme and other plugin styles */
body .tutor-frontend .tutor-wrap .text-regular-tiny,
body .tutor-frontend .tutor-wrap .tutor-text-regular-tiny,
body .tutor-frontend .tutor-wrap .text-regular-small,
body .tutor-frontend .tutor-wrap .tutor-text-regular-small,
body .tutor-frontend .tutor-wrap .text-body {
    font-size: 15px !important;
    line-height: 150% !important;
}

body .tutor-frontend .tutor-wrap .text-medium-tiny,
body .tutor-frontend .tutor-wrap .tutor-text-medium-tiny,
body .tutor-frontend .tutor-wrap .text-bold-tiny,
body .tutor-frontend .tutor-wrap .tutor-text-bold-tiny {
    font-size: 14px !important;
    line-height: 150% !important;
}

/* Override inline styles that might be set by JavaScript */
.tutor-wrap * {
    font-size: inherit !important;
}

/* Ensure minimum readable font size across all Tutor elements */
.tutor-frontend .tutor-wrap,
.tutor-frontend .tutor-wrap *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-size: 15px !important;
    line-height: 140% !important;
}
