/* Can chinh footer pagination */
/* ===== Pagination wrapper ===== */
/* ===== Wrapper ===== */
/* ===== WRAPPER ===== */
.pagination-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow: hidden; /* tranh vo layout */
}

/* ===== BEN TRAI ===== */
.pagination-total {
    font-size: 14px;
    white-space: nowrap;
}

/* ===== BEN PHAI ===== */
.pagination-right {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    max-width: 100%;
    overflow-x: auto; /* scroll neu dai */
}

/* ===== THANH PHAN TRANG ===== */
.pagination-bar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* khong xuong dong */
    max-width: 100%;
    overflow-x: auto; /* tranh vo man hinh */
    -webkit-overflow-scrolling: touch; /* muot tren ios */
}

/* ===== ITEM ===== */
.pagination-item,
.pagination-current {
    flex: 0 0 auto; /* khong bi co gian */
}

/* ===== SO TRANG ===== */
.pagination-number {
    min-width: 36px;
    text-align: center;
}

/* ===== TRANG HIEN TAI ===== */
.pagination-current {
    font-weight: 700;
}

/* ===== MOBILE INFO (2/10) ===== */
.pagination-mobile-info {
    display: none;
    font-weight: 600;
    margin: 0 6px;
    white-space: nowrap;
}

/* ===== WRAP SO TRANG ===== */
.pagination-number-wrap {
    display: inline-block;
}

/* ===== SCROLL BAR NHO GON ===== */
.pagination-bar::-webkit-scrollbar {
    height: 4px;
}
.pagination-bar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {

    /* layout doc */
    .pagination-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    /* ben phai full width */
    .pagination-right {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
    }

    /* giam size nut */
    .pagination-item,
    .pagination-current {
        margin-right: 4px !important;
        padding: 6px 8px !important;
        font-size: 14px;
    }

    /* an so trang */
    .pagination-number-wrap {
        display: none;
    }

    /* an tat ca nut */
    .pagination-item {
        display: none;
    }

    /* chi hien first prev next last */
    .page-first,
    .page-prev,
    .page-next,
    .page-last {
        display: inline-block;
    }

    /* hien current page */
    .pagination-mobile-info {
        display: inline-block;
    }

    /* can giua */
    .pagination-bar {
        justify-content: center;
        gap: 6px;
    }
}

/* ===== Responsive mobile ===== */
@media (max-width: 600px) {
    .pagination-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .pagination-bar {
        width: 100%;
    }
}
/* CALENDAR */
/* ===== Joomla calendar: giu input + nut lich cung 1 dong ===== */

/* Joomla 3 hay tao .input-append / .input-prepend */
.field-calendar .input-append,
.field-calendar .input-prepend {
    display: flex;
    align-items: stretch;
    width: 100%;
}

/* Joomla 4 / Bootstrap hay tao .input-group */
.field-calendar .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

/* Input calendar */
.field-calendar input[type="text"],
.field-calendar input[type="date"],
.field-calendar .calendar {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;          /* quan trong de khong bi tran */
    box-sizing: border-box;
}

/* Nut icon calendar (button / a) */
.field-calendar .btn,
.field-calendar button,
.field-calendar a.btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Neu nut bi thap/le: can chieu cao bang input */
.field-calendar .btn,
.field-calendar button,
.field-calendar a.btn {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Khoang cach giua input va nut */
.field-calendar .input-append > *,
.field-calendar .input-prepend > *,
.field-calendar .input-group > * {
    margin: 0;
}

.field-calendar .input-append > * + *,
.field-calendar .input-prepend > * + *,
.field-calendar .input-group > * + * {
    margin-left: 6px;
}

/* Neu ban dang gan w3-input cho calendar input */
.field-calendar .w3-input {
    width: 100%;
}

/* (Tuy chon) Neu muon nut lich cung style w3 */
.field-calendar .btn,
.field-calendar a.btn,
.field-calendar button {
    border-radius: 4px;
}
.control-label, .controls{
    padding: 3px 0;
}
.calendar-fix {
    display: inline-block !important;
    width: auto !important;
}
button#jform_ngay_btn {
    height: 30px !important;
    width: 30px !important;
    padding: 6px 8px !important;
    font-size: 16px !important;
}
button[id$="_btn"] .icon-calendar {
    display: none;
}

button[id$="_btn"]:before {
    font-family: "FontAwesome";
    content: "\f073";
    font-size: 16px;
}
/* Check DATA JS*/

/* Joomla form validate highlight */
input.invalid,
select.invalid,
textarea.invalid {
    border: 2px solid #ff9800 !important; /* vang */
    background-color: #fff3cd !important;
}

.control-group.has-error .control-label {
    color: #e65100;
}

/* END Check DATA JS*/

/* box message chung */
#system-message-container .alert {
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 4px solid transparent;
    background-color: #f5f5f5;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    font-size: 14px;
}

/* tieu de message neu co */
#system-message-container .alert h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

/* list ben trong message */
#system-message-container .alert ul {
    margin: 0;
    padding-left: 18px;
}

#system-message-container .alert li {
    margin-bottom: 2px;
}

/* message thong thuong */
#system-message-container .alert-message,
#system-message-container .alert-notice {
    background-color: #e3f2fd;   /* xanh nhat */
    border-left-color: #2196F3;  /* xanh duong */
    color: #0d47a1;
}

/* message thanh cong */
#system-message-container .alert-success {
    background-color: #e8f5e9;   /* xanh la nhat */
    border-left-color: #4CAF50;  /* xanh la */
    color: #1b5e20;
}

/* message loi */
#system-message-container .alert-error,
#system-message-container .alert-danger {
    background-color: #ffebee;   /* do nhat */
    border-left-color: #F44336;  /* do */
    color: #b71c1c;
}

/* message thong tin */
#system-message-container .alert-info {
    background-color: #e0f7fa;   /* xanh cyan nhat */
    border-left-color: #00ACC1;  /* cyan */
    color: #004d40;
}

/* nut dong message neu co */
#system-message-container .alert .close {
    float: right;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

#system-message-container .alert .close:hover {
    opacity: 1;
}