﻿/*
Theme Name:   Hello Elementor Child
Theme URI:    https://elementor.com/
Description:  Child theme for Hello Elementor.
Author:       Your Name
Author URI:   https://yourwebsite.com
Template:     hello-elementor
Version:      1.0.0
*/

/* เขียน CSS เพิ่มเติมต่อจากบรรทัดนี้ */
h3 {font-size: 1.2em;}

/* ==========================================
   TUTOR LMS NOTIFICATION OVERRIDE FOR HELLO THEME
   ========================================== */

/* 1. จัดตำแหน่งปุ่มกระดิ่งและ Badge ตัวเลข */
#tutor-notifications-wrapper {
    position: relative;
    display: inline-block;
}
.tutor-iconic-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.tutor-iconic-btn:hover {
    background: #e2e8f0;
}
.tutor-floating-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444; /* สีแดงแจ้งเตือน */
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    padding: 2px 6px;
    line-height: 1;
    border: 2px solid #ffffff;
}

/* 2. จัดโครงสร้างแถบ Offcanvas ด้านข้าง (ซ่อนไว้ก่อน) */
.tutor-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 100%;
    background: #ffffff;
    z-index: 99999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%); /* ซ่อนแถบไปทางขวา */
}
/* คลาสสำหรับสั่งให้แถบแสดงตัว (ทำงานร่วมกับ JS ด้านล่าง) */
.tutor-offcanvas.is-open {
    transform: translateX(0);
}

/* 3. จัดสไตล์กล่อง Backdrop (ฉากหลังมืดเวลาแถบโผล่) */
.tutor-offcanvas-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.tutor-offcanvas.is-open .tutor-offcanvas-backdrop {
    opacity: 1;
    visibility: visible;
}

/* 4. รายละเอียดส่วนหัวและเนื้อหาภายในการ์ดแจ้งเตือน */
.tutor-offcanvas-main {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tutor-offcanvas-header {
    padding: 20px;
    border-bottom: 1px solid #ededed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tutor-offcanvas-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* 5. ปรับหน้าตาลิสต์แจ้งเตือนแต่ละรายการ (Notification Item) */
.tutor-notification-element {
    display: flex;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.2s;
}
.tutor-notification-element:hover {
    background: #f1f5f9;
}
.element-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
}
.element-purple {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
}
.element-content .header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.meta .time {
    font-size: 11px;
    color: #64748b;
    margin-left: 8px;
}
.message {
    font-size: 13px;
    line-height: 1.4;
}

/* Utilities เสริมเผื่อไอคอนไม่ขึ้น */
.tutor-d-flex { display: flex; }
.tutor-align-center { align-items: center; }
.tutor-ml-12 { margin-left: 12px; }

