/* tamayuzCore - Simplified Learning Paths, Tests & Processes */

/* ========================================
   GENERAL SIMPLIFICATIONS
   ======================================== */

/* Hide advanced settings buttons everywhere - FORCE HIDE */
.advanced-params,
button[name="advanced_params"],
a[name="advanced_params"],
input[name="advanced_params"],
.advanced_settings,
.advanced-options,
#advanced_params_options,
div#advanced_params_options,
.advanced_params_options,
[id*="advanced"],
[class*="advanced"],
button:contains("Advanced"),
a:contains("Advanced") {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Hide "Advanced Parameters" labels */
label:contains("Advanced"),
span:contains("Advanced Parameters") {
    display: none !important;
}

/* ========================================
   LEARNING PATH SIMPLIFICATION
   ======================================== */

/* Hide SCORM/AICC upload options - keep only simple content */
.scorm-upload,
.aicc-upload,
img[src*="import_scorm"],
div:has(> a[href*="lp_upload.php"]) {
    display: none !important;
}

/* IMPORTANT: Ensure content iframes are NEVER hidden */
iframe#content_id,
iframe#content_id_blank,
iframe[name="content_id"],
#content_id,
.lp-view-zone iframe,
.lp-content-view iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 500px !important;
}

/* Hide complex LP creation options */
select[name="lp_maker"],
label[for="lp_maker"],
.form-group:has(select[name="lp_maker"]) {
    display: none !important;
}

/* Hide prerequisite options (too complex) */
select[name="prerequisite"],
input[name="prerequisite"],
label[for="prerequisite"],
.form-group:has(select[name="prerequisite"]),
.form-group:has(input[name="prerequisite"]) {
    display: none !important;
}

/* Hide prerequisite percentage */
input[name="prerequisite_min_score"],
input[name="prerequisite_max_score"],
label:contains("PrerequisiteMinScore"),
label:contains("PrerequisiteMaxScore") {
    display: none !important;
}

/* Hide audio/video advanced options */
input[name="audio"],
.audio-upload-advanced,
#audio_options {
    display: none !important;
}

/* Hide LP timer settings (overwhelming) */
input[name="accumulate_scorm_time"],
label:contains("AccumulateScormTime"),
.form-group:has(input[name="accumulate_scorm_time"]) {
    display: none !important;
}

/* Hide LP extra complex fields */
input[name="use_max_score"],
input[name="publicated_on"],
label[for="use_max_score"],
label[for="publicated_on"],
.form-group:has(input[name="use_max_score"]),
.form-group:has(input[name="publicated_on"]) {
    display: none !important;
}

/* Simplify LP item type selection - hide complex types */
option[value="scorm"],
option[value="aicc"],
option[value="asset"],
option[value="sco"] {
    display: none !important;
}

/* Hide LP tracking/stats complexity */
.lp-tracking-details,
.detailed-progress,
a[href*="lp_stats.php"],
a[href*="lp_report.php"] {
    /* Keep basic stats, hide advanced */
}

/* ========================================
   EXERCISE/TEST SIMPLIFICATION
   ======================================== */

/* Hide advanced exercise settings */
#advanced_params_options {
    display: none !important;
}

/* Hide complex question types - keep only essential - FORCE HIDE */
option[value="CALCULATED_ANSWER"],
option[value="DRAGGABLE"],
option[value="ANNOTATION"],
option[value="ORAL_EXPRESSION"],
option[value="GLOBAL_MULTIPLE_ANSWER"],
option[value="READING_COMPREHENSION"],
option[value="UPLOAD_ANSWER"],
option[value="HOTSPOT"],
option[value="HOTSPOT_COMBINATION"],
option[value="HOTSPOT_DELINEATION"],
option[value="MATCHING_DRAGGABLE"],
option[value="MATCHING_COMBINATION"],
option[value="MULTIPLE_ANSWER_DROPDOWN"],
option[value="MULTIPLE_ANSWER_DROPDOWN_COMBINATION"],
option[value="MULTIPLE_ANSWER_COMBINATION"],
option[value="MULTIPLE_ANSWER_TRUE_FALSE"],
option[value="MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY"],
option[value="FILL_IN_BLANKS_COMBINATION"],
option[value="6"],
option[value="7"],
option[value="8"],
option[value="10"],
option[value="11"],
option[value="12"],
option[value="13"],
option[value="14"],
option[value="15"],
option[value="16"],
option[value="17"],
option[value="18"],
option[value="19"],
option[value="20"],
option[value="21"],
option[value="22"],
option[value="23"],
option[value="24"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
}

/* Keep only: UNIQUE_ANSWER, MULTIPLE_ANSWER, FILL_IN_BLANKS, MATCHING, FREE_ANSWER */

/* Hide complex exercise options */
input[name="propagate_neg"],
input[name="save_correct_answers"],
input[name="hide_question_title"],
input[name="hide_question_number"],
input[name="question_selection_type"],
input[name="on_success_message"],
input[name="on_failed_message"],
input[name="email_notification_template"],
input[name="notify_user_by_email"],
input[name="end_button"],
input[name="review_answers"],
input[name="randomAnswers"],
input[name="randomByCat"],
input[name="display_category_name"],
label[for="propagate_neg"],
label[for="save_correct_answers"],
label[for="hide_question_title"],
label[for="hide_question_number"],
label[for="question_selection_type"],
.form-group:has(input[name="propagate_neg"]),
.form-group:has(input[name="save_correct_answers"]),
.form-group:has(input[name="hide_question_title"]),
.form-group:has(input[name="hide_question_number"]),
.form-group:has(input[name="question_selection_type"]),
.form-group:has(input[name="on_success_message"]),
.form-group:has(input[name="on_failed_message"]),
.form-group:has(input[name="email_notification_template"]),
.form-group:has(input[name="notify_user_by_email"]),
.form-group:has(input[name="end_button"]),
.form-group:has(input[name="review_answers"]),
.form-group:has(input[name="randomAnswers"]),
.form-group:has(input[name="randomByCat"]),
.form-group:has(input[name="display_category_name"]) {
    display: none !important;
}

/* Hide exercise category (if not needed) */
select[name="exercise_category_id"],
label[for="exercise_category_id"],
.form-group:has(select[name="exercise_category_id"]) {
    display: none !important;
}

/* Hide exercise expiration settings (keep it simple) */
input[name="activate_start_date_check"],
input[name="activate_end_date_check"],
label[for="activate_start_date_check"],
label[for="activate_end_date_check"],
.form-group:has(input[name="activate_start_date_check"]),
.form-group:has(input[name="activate_end_date_check"]) {
    display: none !important;
}

/* Hide model type (confusing) */
select[name="model_type"],
label[for="model_type"],
.form-group:has(select[name="model_type"]) {
    display: none !important;
}

/* Hide score model settings */
select[name="score_model_id"],
label[for="score_model_id"],
.form-group:has(select[name="score_model_id"]) {
    display: none !important;
}

/* Hide global exercise settings */
input[name="global_category_id"],
label[for="global_category_id"],
.form-group:has(input[name="global_category_id"]) {
    display: none !important;
}

/* ========================================
   QUESTION CREATION SIMPLIFICATION
   ======================================== */

/* Hide question extra fields */
.question-extra-field,
div[id^="extra_question_"],
input[name^="extra_question_"] {
    display: none !important;
}

/* Hide question categories (keep it simple) */
select[name="questionCategory"],
label[for="questionCategory"],
.form-group:has(select[name="questionCategory"]) {
    display: none !important;
}

/* Hide question level/difficulty (unnecessary) */
select[name="questionLevel"],
input[name="questionLevel"],
label[for="questionLevel"],
.form-group:has(select[name="questionLevel"]),
.form-group:has(input[name="questionLevel"]) {
    display: none !important;
}

/* Hide parent/media attachment (too complex) */
select[name="parent_id"],
label[for="parent_id"],
.form-group:has(select[name="parent_id"]) {
    display: none !important;
}

/* ========================================
   ASSIGNMENT SIMPLIFICATION
   ======================================== */

/* Hide assignment advanced options */
input[name="add_to_calendar"],
input[name="enable_qualification"],
input[name="qualification"],
label[for="add_to_calendar"],
label[for="enable_qualification"],
label[for="qualification"],
.form-group:has(input[name="add_to_calendar"]),
.form-group:has(input[name="enable_qualification"]),
.form-group:has(input[name="qualification"]) {
    display: none !important;
}

/* ========================================
   DOCUMENT MANAGEMENT SIMPLIFICATION
   ======================================== */

/* Hide document advanced options */
select[name="if_exists"],
input[name="unzip"],
label[for="if_exists"],
label[for="unzip"],
.form-group:has(select[name="if_exists"]),
.form-group:has(input[name="unzip"]) {
    display: none !important;
}

/* Hide document template options */
select[name="curdirpath"],
.document-template-selector {
    display: none !important;
}

/* ========================================
   GENERAL FORM IMPROVEMENTS
   ======================================== */

/* Modern form styling for all processes */
.form-control {
    border-radius: 6px;
    border: 1px solid #e1e8ed;
    padding: 10px 15px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Labels */
.control-label,
label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Buttons - tamayuzCore gradient */
.btn-primary,
.btn-success,
button[type="submit"],
input[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-primary:hover,
.btn-success:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    opacity: 0.9 !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Secondary buttons */
.btn-default,
.btn-secondary {
    background: #f8f9fa !important;
    border: 1px solid #e1e8ed !important;
    color: #495057 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.btn-default:hover,
.btn-secondary:hover {
    background: #e9ecef !important;
    border-color: #dee2e6 !important;
}

/* Form sections */
.form-group {
    margin-bottom: 20px;
}

.form-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

/* Help text */
.help-block {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* ========================================
   HIDE UNNECESSARY MENU ITEMS
   ======================================== */

/* Hide complex import/export options */
a[href*="qti2.php"],
a[href*="aiken.php"],
a[href*="hotpotatoes"],
li:has(> a[href*="qti2.php"]),
li:has(> a[href*="aiken.php"]),
li:has(> a[href*="hotpotatoes"]) {
    display: none !important;
}

/* Hide statistics links (keep simple reporting) */
a[href*="question_stats.php"],
a[href*="stats_attempts.php"],
li:has(> a[href*="question_stats.php"]),
li:has(> a[href*="stats_attempts.php"]) {
    display: none !important;
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    .form-section {
        padding: 20px 15px;
    }
    
    .btn-primary,
    .btn-success,
    button[type="submit"],
    input[type="submit"] {
        width: 100%;
        margin-top: 10px;
    }
}

/* ========================================
   CLEAN ALERTS & MESSAGES
   ======================================== */

.alert {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger,
.alert-error {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ========================================
   TABLES CLEANUP
   ======================================== */

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e1e8ed;
    padding: 15px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* ========================================
   MODAL/POPUP IMPROVEMENTS
   ======================================== */

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
}

.modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e1e8ed;
}

/* ========================================
   BREADCRUMB SIMPLIFICATION
   ======================================== */

.breadcrumb {
    background: transparent;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb-item {
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    padding: 0 8px;
}

