/* Container và tiêu đề */
.container-select-category {
    max-width: 480px;
    margin: 40px auto;
    padding: 20px 24px;
    background: #fff;
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.1);
    border-radius: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
}

h2 {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: #333;
    text-align: center;
}

/* Alert lỗi */
.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

/* Dropdown tổng thể */
.category-dropdown {
    width: 100%;
    position: relative;
    user-select: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
    border: 1.5px solid #ddd;
    transition: border-color 0.3s ease;
    background-color: #fafafa;
    cursor: pointer;
}

.category-dropdown:hover,
.category-dropdown:focus-within {
    border-color: #4a90e2;
    background-color: #fff;
}

/* Phần hiển thị đã chọn */
.dropdown-selected {
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-selected::after {
    content: '\f078'; /* fontawesome chevron-down */
    font-family: "FontAwesome";
    font-size: 14px;
    color: #888;
    transition: transform 0.3s ease;
}

/* Khi mở dropdown, icon xoay xuống */
.category-dropdown.open .dropdown-selected::after {
    transform: rotate(180deg);
}

/* Danh sách dropdown */
.dropdown-list {
    position: absolute;
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1.5px solid #4a90e2;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgb(74 144 226 / 0.2);
    z-index: 1100;
    padding-left: 0;
    margin-top: 0;
    list-style: none;
}

/* Ẩn scrollbar trên Chrome/Edge nhưng vẫn scroll được */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background-color: #4a90e2;
    border-radius: 3px;
}

/* Item cha */
.parent-item {
    padding: 12px 18px;
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-direction: column;
}

.parent-item:last-child {
    border-bottom: none;
}

/* Icon toggle */
.toggle-child {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    flex-grow: 1;
}

.toggle-child i {
    font-size: 14px;
    color: #4a90e2;
    transition: transform 0.3s ease;
}

/* Khi mở, icon xoay */
.parent-item.open > .toggle-child i {
    transform: rotate(90deg);
}

/* Danh sách con */
.child-list {
    list-style: none;
    padding-left: 32px;
    margin: 6px 0 6px 0;
    border-left: 2px solid #4a90e2;
    max-height: 180px;
    overflow-y: auto;
}

/* Item con */
.child-item {
    padding: 8px 18px;
    font-weight: 500;
    color: #444;
    border-radius: 6px;
    transition: background-color 0.25s ease;
    cursor: pointer;
}

.child-item:hover,
.child-item:focus {
    background-color: #e3f0ff;
    color: #2a63bf;
}

/* Button */
.btn-primary {
    margin-top: 20px;
}


.login-modal {
  display: none; /* mặc định ẩn */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;

  /* Hiển thị khi thêm class .show */
  &.show {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Hộp modal chính */
.login-modal-content {
  background-color: #fff;
  padding: 30px 25px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  max-width: 400px;
  width: 90%;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tiêu đề */
.login-modal-content h3 {
  margin-bottom: 25px;
  font-weight: 600;
  font-size: 1.3rem;
  color: #333;
}

/* Container nút bấm */
.login-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Nút chung */
.login-modal-buttons button {
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: background-color 0.25s ease, color 0.25s ease;
  min-width: 110px;
}

/* Nút đăng nhập */
.btn-login {
  background-color: #007bff;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}
.btn-login:hover {
  background-color: #0056b3;
}

/* Nút quay lại */
.btn-cancel {
  background-color: #e0e0e0;
  color: #333;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.btn-cancel:hover {
  background-color: #bdbdbd;
}

/* Responsive */
@media (max-width: 600px) {
    .container-select-category {
        margin: 20px 16px;
        padding: 16px 16px;
    }
    h2 {
        font-size: 1.5rem;
    }

    .login-modal-content {
        padding: 20px 15px;
    }
    .login-modal-buttons button {
        min-width: 90px;
        font-size: 0.9rem;
        padding: 9px 18px;
    }
}