
/* ============== ส่วนหัว ============== */

/* Config Header Actions */
.config-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1.1rem;
    margin-bottom: 1.2rem;
}

/* security-notice */
.security-notice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    align-items: center;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    flex: 1 1 60%;
    min-width: 200px;
	min-height: 43px;
}

.security-notice i {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.security-notice .small {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #d1d5db;
}

/* ปุ่ม "ปิดการใช้งาน" (อันตราย) */
.btn-disable-config {
    background-color: #dc2626;
    color: #000;
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.btn-disable-config:hover {
    background-color: #b91c1c;
    border-color: #f59e0b;
    transform: scale(1.02);
}

/* ปุ่ม "ออกจากระบบ" */
.btn-logout-config {
    background-color: transparent;
    color: #f87171;
    border-color: #dc2626;
}
.btn-logout-config:hover {
    background-color: #dc2626;
    color: #000;
    border-color: #fbbf24;
    transform: scale(1.02);
}

/* Mobile <= 768px */
@media (max-width: 768px) {
    .config-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
    }
    .config-header-actions .security-notice {
        flex: 1 1 100%;
    }
    .config-header-actions .d-flex.gap-2 {
        justify-content: center;
    }
	.security-notice {
        flex: 1 1 100%;
        min-width: unset;
        padding: 0.4rem 0.6rem;
    }
    .security-notice .small {
        font-size: 0.71rem;
        line-height: 1.4;
    }
    .security-notice i {
        font-size: 0.875rem;
        margin-top: 0.1rem;
    }
}


/* ============== ส่วนของ หน้าต่าง Modal ============== */
#loginLockModal .modal-dialog,
#registerLockModal .modal-dialog,
#disableConfigModal .modal-dialog {
    max-width: 35%;
    width: auto;
}
#menuModal .modal-dialog {
    max-width: 60%;
    width: auto;
}
@media (max-width: 768px) {
    #loginLockModal .modal-dialog,
	#registerLockModal .modal-dialog,
    #disableConfigModal .modal-dialog,
	#menuModal .modal-dialog {
        max-width: 99%;
        width: auto;
    }
}

/* ทำให้พื้นหลังเบลอเมื่อเปิดหน้าต่าง */
#loginLockModal.fade.show,
#registerLockModal.fade.show,
#disableConfigModal.fade.show {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px); /* สำหรับเบราว์เซอร์ที่รองรับ Webkit */
    background-color: rgba(255, 255, 255, 1); /* สีพื้นหลัง semi-transparent เพื่อให้ backdrop-filter ทำงานได้ */
}

@media (max-width: 768px) {
    /* ปรับกล่องหัวข้อหลักให้เรียงแนวตั้งและกระชับพื้นที่ */
    .d-flex.justify-content-between.align-items-center.mb-4.pb-2.border-bottom {
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important; /* ลดระยะห่างระหว่างข้อความกับปุ่ม */
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
    }

    /* ลดขนาดหัวข้อหลัก (H2) */
    .main-text {
        font-size: 16px !important;
        font-weight: bold !important;
    }

    /* ลดขนาดข้อความรายละเอียดให้เล็กจิ๋ว */
    .main-text-details {
        font-size: 11px !important;
        margin-top: 2px !important;
        opacity: 0.8;
    }

    /* ปรับฟอร์มปุ่มให้กระชับ ไม่กินพื้นที่ */
    .d-flex.justify-content-between.align-items-center.mb-4.pb-2.border-bottom form {
        width: auto !important; /* ไม่ขยายเต็มจอ เพื่อไม่ให้ปุ่มดูหนาเกินไป */
    }

    /* ปรับปุ่มออกจากระบบให้เล็กและเตี้ยลง */
    .btn-danger {
        font-size: 12px !important;
        padding: 4px 12px !important; /* ลดความหนาของปุ่ม */
        font-weight: 600 !important;
    }
}

/* การเลือกไอคอน สำหรับ แก้ไข/เพิ่ม ของส่วน "เมนูต่างๆ" */

/* สไตล์ปุ่มไอคอนปกติในคลัง */
.icon-select-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
    transition: all 0.15s ease-in-out;
    border-radius: 6px;
}
.icon-select-btn:hover {
    border-color: #6c757d !important;
    background-color: #343a40 !important;
}
.icon-select-btn.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.5);
}

/* สไตล์ปุ่มพิเศษสีฟ้า กรณีพิมพ์ระบุเองภายนอกคลัง */
.custom-icon-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    width: 100%;
    font-size: 0.875rem;
    cursor: pointer;
    background-color: rgba(13, 202, 240, 0.05) !important;
    border: 1px dashed #0dcaf0 !important;
    color: #0dcaf0 !important;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}
.custom-icon-btn:hover {
    background-color: rgba(13, 202, 240, 0.15) !important;
}
.custom-icon-btn.active {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(13, 202, 240, 0.5);
}
.custom-icon-btn.active code {
    color: #000 !important;
    background-color: rgba(255,255,255,0.4) !important;
}

/* ---------------------------- */

