/*
 * COMPONENTS.CSS - Компоненты интерфейса
 * Содержит: кнопки, формы, карточки, модальные окна, dropdown, badges, навигация
 */

/* ===== DROPDOWN MENU ===== */
.dropdown-menu {
  border-radius: var(--border-radius-lg);
  border: 0;
  box-shadow: var(--shadow) !important;
  animation: slideDown 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dropdown-toggle-nocaret:after {
  display: none;
}

.dropup .dropdown-toggle-nocaret:after {
  display: none;
}

/* ===== BADGES & CHIPS ===== */
.chip {
  display: inline-block;
  height: 32px;
  padding: 0 12px;
  margin-right: 1rem;
  margin-bottom: 1rem;
  font-size: 14px;
  font-weight: 500;
  line-height: 32px;
  color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
  background-color: #f1f1f1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  transition: var(--transition-base);
  box-shadow: none;
}

.chip img {
  float: left;
  width: 32px;
  height: 32px;
  margin: 0 8px 0 -12px;
  border-radius: 50%;
}

.chip.chip-md {
  height: 42px;
  line-height: 42px;
  border-radius: 21px;
}

.chip.chip-md img {
  height: 42px;
  width: 42px;
}

.badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: #f2f2f3;
  cursor: pointer;
  border-radius: var(--border-radius);
}

.badge-icon .badge-number {
  width: 20px;
  height: 20px;
  background-color: var(--danger-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  padding: 1px;
}

/* ===== BUTTONS ===== */
.btn-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #494949;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: var(--transition-base);
  cursor: pointer;
}

.btn-icon:hover,
.btn-icon:focus {
  background-color: #efefef;
}

.btn-icon.btn-icon-sm {
  width: 30px;
  height: 30px;
}

.sharelink {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #494949;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: var(--transition-base);
}

.sharelink:hover,
.sharelink:focus {
  background-color: #efefef;
}

.order-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #494949;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: var(--transition-base);
  cursor: pointer;
}

.order-delete:hover,
.order-delete:focus {
  background-color: #efefef;
}

.user-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: var(--transition-base);
  position: absolute;
  right: -50px;
  top: 16px;
  background-color: #050505;
}

.primaery-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #494949;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: var(--transition-base);
}

.primaery-menu-close:hover,
.primaery-menu-close:focus {
  background-color: #efefef;
}

/* ===== FORMS ===== */
.form-control-custom {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--dark-color);
  background-color: #fff;
  background-image: none;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.form-control-custom:focus {
  color: var(--dark-color);
  background-color: #fff;
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.subscribe-control .form-control {
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
}

.subscribe-control .btn {
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
}

/* ===== CARDS ===== */
.card-custom {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.card-header-custom {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: var(--light-color);
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.card-body-custom {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.card-footer-custom {
  padding: 0.75rem 1.25rem;
  background-color: var(--light-color);
  border-top: 1px solid var(--border-color);
  border-bottom-left-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
}

/* ===== NAVIGATION ===== */
.nav-custom {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.nav-link-custom {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.nav-link-custom:hover,
.nav-link-custom:focus {
  color: var(--primary-color);
  text-decoration: none;
}

.nav-link-custom.active {
  color: var(--primary-color);
  background-color: var(--light-color);
}

/* Sidebar Navigation */
.metismenu a.mm-active {
  color: var(--primary-color) !important;
  background-color: rgba(var(--theme-primary-rgb), 0.1) !important;
  border-radius: 8px;
}

.metismenu a.mm-active .parent-icon i,
.metismenu a.mm-active .parent-icon span {
  color: var(--primary-color) !important;
}

.metismenu a.mm-active .menu-title {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.vertical-pills button {
  width: 100%;
  text-align: left;
  border-radius: 0%;
}

.vertical-pills .nav-link {
  border-bottom: 1px solid var(--border-color);
  color: #5d5d5d;
}

.vertical-pills .nav-link:last-child {
  border-bottom: 0px solid var(--border-color);
}

.vertical-pills .nav-link.active {
  color: #ffffff;
}

/* ===== PAGINATION ===== */
.pagination-custom {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: var(--border-radius);
}

.page-item-custom {
  margin: 0 2px;
}

.page-link-custom {
  position: relative;
  display: block;
  padding: 0.375rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: var(--primary-color);
  text-decoration: none;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.page-link-custom:hover {
  z-index: 2;
  color: var(--primary-color);
  text-decoration: none;
  background-color: var(--light-color);
  border-color: var(--border-color);
}

.page-item-custom.active .page-link-custom {
  z-index: 3;
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-item-custom.disabled .page-link-custom {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: var(--border-color);
}

/* ===== ALERTS ===== */
.alert-custom {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
}

.alert-primary-custom {
  color: #084298;
  background-color: #cfe2ff;
  border-color: #b6d4fe;
}

.alert-success-custom {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}

.alert-danger-custom {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}

.alert-warning-custom {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffecb5;
}

/* ===== MODALS ===== */
.modal-custom {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0.5;
}

.modal-dialog-custom {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
}

.modal-content-custom {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  outline: 0;
}
