.popup {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  padding: 20px;
}

.popup.popup-show {
  display: flex;
  animation: fadeIn 0.6s ease 1 forwards;
}

.popup.popup-hide {
  display: flex;
  animation: fadeOut 0.6s ease 1 forwards;
}

.popup .popup-container {
  width: 100%;
  max-width: 840px;
  background-color: #fff;
  box-sizing: border-box;
  position: relative;
  max-height: 100%;
  border-radius: 8px;
  overflow: hidden;
  padding: 24px 0;
}

.popup .popup-box {
  overflow-y: auto;
  position: relative;
  padding: 0 24px;
  height: 100%;
  min-height: 260px;
  max-height: 70vh;
}

.popup .popup-container.max-content {
  max-width: fit-content;
}

.popup .popup-box.min-height {
  min-height: unset;
}

.popup .popup-file-form {
  min-width: 450px;
  width: 100%;
}

.popup .popup-file-form .actions input {
  width: 100%;
}

.popup .popup-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
  margin-bottom: 24px;
}

.popup .popup-header p {
  font-size: 14px;
  line-height: 17px;
  color: #999;
  margin: 0;
}

.popup .popup-close {
  position: absolute;
  right: 12px;
  top: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #fff;
  padding: 0;
  border: 0;
  border-radius: 50%;
  z-index: 115;
  transition: background-color 0.5s ease;
}

.popup .popup-close svg {
  color: #333;
  transform: rotate(-45deg);
  width: 24px;
  height: 24px;
}

.popup .popup-close:hover {
  background-color: rgb(245, 244, 244);
}

.popup h4 {
  font-weight: 600;
}

.popup select {
  font-size: 14px;
  line-height: 18px;
  padding: 10px;
  height: 47px;
  width: 100%;
}

.popup .popup-body {
  display: flex;
}

.popup .popup-body-with-height {
  display: flex;
  min-height: 300px;
}

.popup .popup-left-col {
  flex: 0 0 50%;
  padding: 24px 0 24px 0;
  border-top: 1px solid #eff1f6;
  border-right: 1px solid #eff1f6;
}

.popup .popup-left-col .button-tab {
  max-width: 267px;
}

.popup .popup-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  max-height: 500px;
  overflow: auto;
}

.popup .popup-right-col {
  flex: 0 0 50%;
  padding: 24px 0 24px 24px;
  border-top: 1px solid #eff1f6;
}

.popup .popup-right-col p {
  font-size: 12px;
  line-height: 14px;
  color: #999;
  margin: 5px 0;
}

.popup .popup-input {
  margin-top: 20px;
}

.popup .popup-footer {
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eff1f6;
}

.popup .popup-footer.end {
  justify-content: end;
}

.popup .popup-footer-col {
  display: flex;
  gap: 24px;
}

.popup label {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

.popup .popup-form label {
  font-size: 16px;
  line-height: 18px;
  margin-bottom: 5px;
}

.popup .popup-form .popup-field {
  height: 52px;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 18px;
}

.popup .popup-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

.popup .popup-row .button {
  max-width: 120px;
}

.popup .popup-multi-row {
  display: flex;
  align-items: start;
  gap: 24px;
  width: 100%;
  padding: 15px 0;
  border-bottom: 1px solid #eff1f6;
}

.popup .popup-multi-row.items-end {
  align-items: end;
}

.popup .popup-multi-row.no-border {
  display: flex;
  align-items: start;
  gap: 24px;
  width: 100%;
  padding: 15px 0;
  border-bottom: none;
}

.popup .popup-multi-row.no-borders {
  border-top: none!important;
  border-bottom: none!important;
}

.popup .popup-row-text {
  font-size: 16px;
  margin-bottom: 20px;
}

.popup .popup-multi-row .inline-form,
.popup .popup-multi-row .inline-frame {
  display: flex;
  align-items: end;
  gap: 24px;
  width: 100%;
} 

.popup .popup-multi-row.hidden {
  display: none;
}

.popup .popup-multi-row label {
  margin-top: 0;
}

.popup .popup-multi-row label span{
  color: #CA12AA;
}

.popup .popup-multi-row .ts-control {
  min-width: 178px;
}

.popup .popup-multi-row .change-icon--enable {
  background-color: #CA12AA;
}

.popup .popup-multi-row:first-child {
  border-top: 1px solid #eff1f6;
}

.popup .popup-multi-row:last-child {
  border-bottom: 0;
}

.popup .field-row {
  display: flex;
  flex-direction: row;
  gap: 6px;
}

.popup .field-row button {
  min-width: unset;
  width: 47px;
  height: 47px;
  justify-content: center;
}

.popup .field button {
  height: 47px;
}

.popup .field-conatiner {
  border-bottom: 1px solid #eff1f6;
}

.popup .field-conatiner:last-child{
  border-bottom: none;
}


.popup .field.middle {
  width: 290px;
}

.popup .field.wide,
.popup .field.wide input {
  width: 100%;
}

.popup .field.wide input {
  max-width: 100%;
}

.popup .popup-multi-row .field-submit {
  padding: 10px;
  line-height: 27px;
  justify-content: center;
}

.popup input[type='color'],
.popup-table tbody .editable-display:has(.edit_change_color) {
  max-width: 40px !important;
  padding: 5px !important;
}

.popup .popup-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.popup .popup-column.small-size {
  width: unset;
}

.popup .popup-column.no-gap {
  gap: 0;
}

.popup-table {
  width: 100%;
  margin-top: 20px;
}

.popup-table .datatable-scroll {
  max-height: 50vh;
  overflow: unset;
}

.popup-table .color-button{
  display: none;
}

.popup-table table {
  margin-bottom: 0;
}

.popup-table .datatable th,
.popup-table .datatable thead tr:first-child th:first-child {
  background-color: transparent;
  box-shadow: inset 0 -1px 0 #eff1f6;
}

.popup-table .datatable .column-header {
  justify-content: start;
  color: #5068a5;
}

.popup-table tbody td:last-child {
  text-align: end;
}

.popup-table tbody a {
  text-decoration: none;
  color: #5068a5;
}

.popup-table tbody td {
  padding: 10px;
  border-bottom: none;
  text-align: start;
}

.popup-table .datatable td.editable {
  padding: 10px;
  vertical-align: top;
}

.popup-table .datatable td.editable span {
  max-width: 220px;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;  
}

.popup-table .datatable td.editable span::-webkit-scrollbar {
  display: none;
}

.popup-table tbody .editable-display,
.popup-table tbody .edit_change_type {
  width: 250px;
  height: 47px;
}

.popup .ts-wrapper .ts-control {
  height: unset;
  min-height: 47px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Progress bar styles */
.upload-progress {
  width: 100%;
}

.progress-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  transition: width 0.3s ease;
}

.progress-bar.progress-bar-loading {
  background-color: #5068A5;
}

.progress-bar.progress-bar-success {
  background-color: #166534;
}

.progress-bar.progress-bar-error {
  background-color: #dc2626;
}

.progress-text {
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
}

.upload-message {
  text-align: center;
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  display: none;
}

.upload-message.upload-message-success {
  background-color: #d1fae5;
  color: #065f46;
}

.upload-message.upload-message-error {
  background-color: #fee2e2;
  color: #991b1b;
}
