@font-face {
  font-family: vazirThin;
  font-style: normal;
  font-weight: 100;
  src: url("fonts/vazir/Vazir-Thin.eot");
  src:
    url("fonts/vazir/Vazir-Thin.woff") format("woff"),
    url("fonts/vazir/Vazir-Thin.ttf") format("ttf"),
    url("fonts/vazir/Vazir-Thin.woff2") format("woff2");
}
@font-face {
  font-family: vazirBold;
  font-style: normal;
  font-weight: 100;
  src: url("fonts/vazir/Vazir-Bold.eot");
  src:
    url("fonts/vazir/Vazir-Bold.woff") format("woff"),
    url("fonts/vazir/Vazir-Bold.ttf") format("ttf"),
    url("fonts/vazir/Vazir-Bold.woff2") format("woff2");
}
@font-face {
  font-family: vazirLight;
  font-style: normal;
  font-weight: 300;
  src: url("fonts/vazir/Vazir-Light.eot");
  src:
    url("fonts/vazir/Vazir-Light.woff") format("woff"),
    url("fonts/vazir/Vazir-Light.ttf") format("ttf"),
    url("fonts/vazir/Vazir-Light.woff2") format("woff2");
}

@font-face {
  font-family: vazirMedium;
  font-style: normal;
  font-weight: 400;
  src: url("fonts/vazir/Vazir-Medium.eot");
  src:
    url("fonts/vazir/Vazir-Medium.woff") format("woff"),
    url("fonts/vazir/Vazir-Medium.ttf") format("ttf"),
    url("fonts/vazir/Vazir-Medium.woff2") format("woff2");
}
@font-face {
  font-family: vazirBlack;
  font-style: normal;
  font-weight: 950;
  src: url("fonts/vazir/Vazir-Black.eot");
  src:
    url("fonts/vazir/Vazir-Black.woff") format("woff"),
    url("fonts/vazir/Vazir-Black.ttf") format("ttf"),
    url("fonts/vazir/Vazir-Black.woff2") format("woff2");
}

body {
  font-family: vazirLight, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.cursor-pointer {
  cursor: pointer;
}

.file-manager {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.file-manager-first-options-row {
  border: 1px solid #d9d9d9;
  flex-shrink: 0;
}

.file-manager-second-options-row {
  border: 1px solid #d9d9d9;
  border-top: none;
  flex-shrink: 0;
}

.file-manager-third-row {
  border: 1px solid #d9d9d9;
  border-top: none;
  flex-grow: 1;
  overflow: hidden;
}

.file-manager-first-options-row img,
.file-manager-second-options-row img {
  width: 20px;
  height: auto;
}

.first-option-middle-line {
  width: 2px;
  height: 100%;
  background-color: #d9d9d9;
}

.second-row-bg {
  background-color: #f9f9f9;
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  white-space: nowrap;
}

.pathfinder {
  min-width: 0;
  flex-grow: 1;
}

.search-box {
  min-width: 0;
  flex-grow: 1;
}

.input-pathfinder,
.input-search {
  border: none;
  background-color: #f9f9f9;
  width: 100%;
  min-width: 0;
}

.input-pathfinder:focus,
.input-search:focus {
  outline: none;
  background-color: #f9f9f9;
}

.folder-tree {
  border-right: 1px solid #d9d9d9;
  overflow-y: auto;
  height: 100%;
}

.folder-show {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.folder-container {
  padding: 0;
  list-style: none;
  text-align: start;
}

.folder-item img {
  width: 15px;
}

.sub-folder {
  list-style: none;
  padding: 0;
}

.folder-item-holder p {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.img-right,
.img-down {
  filter: invert(0.4);
}

.upload-modal-body {
  padding: 15px;
}

#upload-form {
  height: 150px !important;
  border: 3px dashed #d9d9d9;
  width: 100%;
  background-color: #f5f5f5;
  border-radius: 4px;
  position: relative;
}

.drag-over {
  background-color: #e3f2fd !important;
  border: 2px dashed #2196f3 !important;
}

#upfiles {
  position: absolute;
  width: 100%;
  height: 100%;
  outline: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
}

.upload-file-text {
  font-size: 14px;
  width: 100%;
  height: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre;
  display: flex;
  justify-content: center;
  align-items: center;
}

.upload-modal-header {
  color: #677788;
}

.upload-header-icon {
  color: #677788;
  font-size: 18px;
}

.upload-btn-cancel {
  outline: none;
  border: none;
  padding: 6px 12px;
  color: #a8b1bb;
  border-radius: 4px;
}

.path-list li {
  display: inline-block;
  padding: 2px 6px;
  margin: 1px 2px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  color: #495057;
  transition: all 0.2s ease;
}

.path-list li:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  cursor: pointer;
}

.path-list li:not(:last-child)::after {
  content: "›";
  margin-left: 8px;
  color: #6c757d;
}

.card {
  border: none;
}

.table > :not(:last-child) > :last-child > * {
  border-bottom-color: #d9d9d9;
}

.table > :not(caption) > * > * {
  padding: 0.25rem 0.5rem;
}

#jstree {
  /* overflow: hidden; */
  text-overflow: ellipsis;
  white-space: nowrap;
  height: calc(100vh - 200px) !important;
  overflow: auto;
}

thead tr {
  background-color: #eaf5ff;
}

table tr {
  white-space: nowrap;
}

tbody tr:hover,
tbody tr:active {
  background-color: #e7e7e7;
}

#event_result {
  height: 100%;
  overflow: auto;
}

.file-manager-third-row {
  display: flex;
  height: calc(100vh - 150px) !important;
}

#event_result .table thead {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.file-manager-first-options-row .cursor-pointer:hover:not(.disabled) {
  color: #0dc5c5;
}

.file-manager-second-options-row .cursor-pointer:hover:not(.disabled) {
  background-color: #95f8f8;
}

.disabled {
  color: gray;
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

#file-data {
  width: 100%;
  outline: none;
  border: none;
  padding: 10px 20px;
  min-height: 300px;
  resize: vertical;
}

.active {
  background-color: #a0ccf361 !important;
}

.progress-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background-color: #c2e1fb;
  width: 350px;
  max-width: calc(100vw - 20px);
  padding: 10px;
  border-radius: 4px;
  z-index: 1050;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.progress-container img {
  width: 35px;
  margin-right: 10px;
  flex-shrink: 0;
}

.progress-indicator {
  display: block;
  width: 100%;
  height: 6px;
  background: #fff;
  margin-top: 8px;
  border-radius: 50px;
  position: relative;
}

.uploaded-indicator {
  display: block;
  height: 6px;
  background: #55bff3;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50px;
}

.shareModal .modal-header {
  border-bottom: none;
}

.share-modal-input {
  border: 1px solid #c3c3c3;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  margin-bottom: 8px;
}

.shareModal .modal-footer {
  border-top: none;
}

.share-user-holder {
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
}

.share-user-holder:hover {
  background-color: #f3f3f3;
}

.add-user {
  position: absolute;
  right: 0;
  top: 0;
  right: 17px;
  top: 18px;
}

/* .not-clickable {
  position: relative;
  color: gray;
  opacity: 0.7;
  //pointer-events: none;
  //cursor: not-allowed;
} */

/* .not-clickable:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
} */

/* .not-clickable:hover:before {
  cursor: not-allowed;
  user-select: none;
} */

.error-container {
  margin-bottom: 16px;
}

.shake {
  animation: shake 150ms 2 linear;
  -moz-animation: shake 150ms 2 linear;
  -webkit-animation: shake 150ms 2 linear;
  -o-animation: shake 150ms 2 linear;
}

@keyframes shake {
  0% {
    transform: translate(3px, 0);
  }

  50% {
    transform: translate(-3px, 0);
  }

  100% {
    transform: translate(0, 0);
  }
}

@-moz-keyframes shake {
  0% {
    -moz-transform: translate(3px, 0);
  }

  50% {
    -moz-transform: translate(-3px, 0);
  }

  100% {
    -moz-transform: translate(0, 0);
  }
}

@-webkit-keyframes shake {
  0% {
    -webkit-transform: translate(3px, 0);
  }

  50% {
    -webkit-transform: translate(-3px, 0);
  }

  100% {
    -webkit-transform: translate(0, 0);
  }
}

@-ms-keyframes shake {
  0% {
    -ms-transform: translate(3px, 0);
  }

  50% {
    -ms-transform: translate(-3px, 0);
  }

  100% {
    -ms-transform: translate(0, 0);
  }
}

@-o-keyframes shake {
  0% {
    -o-transform: translate(3px, 0);
  }

  50% {
    -o-transform: translate(-3px, 0);
  }

  100% {
    -o-transform: translate(0, 0);
  }
}

.folder-row {
  cursor: pointer;
}

.remove-share-access {
  font-size: 10px;
  display: inline-block;
  margin-left: -10px;
  transform: translate(0px, 3px);
}

.table tbody tr.move-back-folder {
  cursor: default;
}

.table tbody tr.move-back-folder .row-checkbox {
  display: none !important;
}

.cut-marked,
.jstree-cut.jstree-anchor {
  opacity: 0.6;
  background-color: #fff3cd !important;
  position: relative;
}

.cut-marked td {
  position: relative;
}

.cut-marked td:first-child::after,
.jstree-cut.jstree-anchor::after {
  content: "cut";
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 10px;
  color: #ff0000;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 3px;
  border-radius: 2px;
}

.table tbody tr {
  cursor: pointer;
}

/* Responsive improvements */
.min-width-0 {
  min-width: 0;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile-specific styles */
@media (max-width: 767.98px) {
  .file-manager-first-options-row,
  .file-manager-second-options-row {
    padding: 8px 0;
  }

  .file-manager-first-options-row .d-flex,
  .file-manager-second-options-row .d-flex {
    justify-content: center;
  }

  .folder-tree {
    border-right: none;
    border-bottom: 1px solid #d9d9d9;
    height: 200px;
  }

  .folder-show {
    height: calc(100% - 200px);
  }

  .progress-container {
    width: calc(100% - 20px);
    max-width: none;
  }
}

@media (max-width: 575.98px) {
  .second-row-bg {
    padding: 3px 6px;
    font-size: 12px;
  }

  .file-manager-first-options-row img,
  .file-manager-second-options-row img {
    width: 16px;
  }
}

/* مخفی کردن چک‌باکس‌ها در حالت عادی */
.table .row-checkbox {
  display: none;
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

/* نمایش چک‌باکس‌ها در حالت انتخاب چندتایی */
.table.selection-mode .row-checkbox {
  display: inline-block;
}

/* بقیه استایل‌ها همون طور بمونه */
.table.selection-mode tbody tr {
  cursor: default;
}

.table tbody tr.active {
  background-color: #e3f2fd !important;
}

.selection-mode {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.custom-progress-container {
  width: 100%;
  text-align: center;
}

.custom-progress-text {
  margin-bottom: 10px;
  font-size: 16px;
}

.custom-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.custom-progress-fill {
  height: 100%;
  background-color: #00ff40;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.current-item {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.share-mode {
  opacity: 0.9;
  border-left: 3px solid #ffc107;
}

.disabled-tree {
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.search-highlight {
  background-color: #fff3cd !important;
}
mark {
  background-color: yellow;
  padding: 0;
}

.context-menu {
  display: none;
  position: absolute;
  z-index: 1000;
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  min-width: 220px; /* عرض بیشتر */
}

.context-menu ul {
  margin: 0;
  list-style: none;
  padding: 0;
}

.context-menu li {
  cursor: pointer;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
  position: relative;
  border-bottom: 1px solid #f0f0f0;
}

.context-menu li:last-child {
  border-bottom: none;
}

.context-menu li:hover:not(.disabled) {
  background-color: #e7e7e7;
}

/* استایل‌های مخصوص submenu */
.has-submenu {
  position: relative;
  padding-right: 24px !important;
}

.has-submenu::after {
  content: "▸";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #555;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.has-submenu:hover::after {
  transform: translateY(-50%) translateX(2px);
  color: #9ab5b5;
}

.submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  background: #ffffff;
  border: 1px solid #ccc;
  border-left: 2px solid #9ab5b5;
  border-radius: 0 8px 8px 0;
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.2);
  min-width: 180px;
  padding: 6px 0;
  z-index: 1001; /* بالاتر از منوی اصلی */
}

.submenu li {
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
}

.submenu li:hover {
  background: #9ab5b5;
}

.submenu li:last-child {
  border-bottom: none;
}

.has-submenu:hover .submenu {
  display: block;
}

/* رسپانسیو */
@media (max-width: 767.98px) {
  .has-submenu:active .submenu,
  .has-submenu:focus .submenu {
    display: block;
  }
  .context-menu {
    max-width: 200px;
    min-width: 180px;
  }

  .context-menu li {
    padding: 6px 12px;
    font-size: 13px;
  }

  .submenu {
    min-width: 160px;
  }
}

.user-avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.tree-shared-indicator,
.tree-shared-count {
  font-size: 0.63em;
  margin-left: 3px;
}

.tree-shared-count {
  font-size: 0.59em;
}

.share-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.59em !important;
  color: #575757 !important;
  opacity: 0.68;
  z-index: 1;
}

.share-overlay-rightPanel {
  position: absolute;
  top: 13px;
  left: 11px;
  font-size: 0.59em !important;
  color: #575757 !important;
  opacity: 0.68;
  z-index: 1;
}

.global-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.current-folder > .jstree-anchor {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%) !important;
  border-left: 4px solid #2196f3 !important;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2) !important;
  border-radius: 4px;
}

.user-menu-container {
  cursor: pointer;
}

.hover-bg-light:hover {
  background-color: #e5e5e6 !important;
}

.user-dropdown-menu {
  animation: fadeInDropdownMenu 0.2s ease;
}

@keyframes fadeInDropdownMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* استایل برای دکمه‌های منو */
.dropdown-item-ment {
  transition: background-color 0.2s;
  cursor: pointer;
}

.dropdown-item-ment:hover {
  background-color: #e5e5e6;
}

.dropdown-menu-divider {
  height: 1px;
  background-color: #dee2e6;
  /* margin: 0.5rem 0; */
}

/* استایل دایره و tooltip */
.drive-circle-container {
  transition: transform 0.2s ease;
  position: relative;
  top: -11px;
}

.drive-circle-container:hover {
  transform: scale(1.05);
}

.drive-circle-container:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 138%;
  left: 140%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: pre;
  z-index: 10000000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #334155;
  pointer-events: none;
}

.drive-circle-box {
  top: 75%;
  left: 60%;
}

@media (max-width: 767.98px) {
  .drive-circle-box {
    top: 57%;
    left: 54%;
  }
  .drive-circle-container:hover::after {
    top: 114%;
  }
}

/* انیمیشن برای loading */
@keyframes driveInfospin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.drive-circle-container.loading canvas {
  animation: driveInfospin 1s linear infinite;
}

.loading-drive-price-overlay {
  position: relative;
}

.loading-drive-price-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.5);
  z-index: 999;
  cursor: wait;
}

.input-drive-loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.price-info-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.price-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 12px;
}

.price-drive-label {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.price-amount {
  font-size: 24px;
  font-weight: bold;
  color: #0d6efd;
  margin-left: 8px;
}

.price-currency {
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.price-details {
  margin-bottom: 12px;
}

.drive-detail-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
}

.drive-detail-label {
  color: #6c757d;
  margin-left: 8px;
  min-width: 120px;
}

.drive-detail-value {
  font-weight: 500;
  color: #212529;
}

.insufficient-credit-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  color: #856404;
  margin-bottom: 12px;
}

.price-total-footer {
  font-size: 12px;
  color: #6c757d;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #dee2e6;
}

.price-loading-placeholder {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.page-loader-content {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  padding: 0;
  text-align: center;
}

/* هدر با نوار گرادیان */
.page-loader-header {
  height: 5px;
  background: linear-gradient(90deg, #3f4f9a, #6c8bc7, #3f4f9a);
  background-size: 200% 100%;
  animation: chakavakProgressBarLoading 1.8s ease-in-out infinite;
}

.page-loader-body {
  padding: 35px 40px 30px;
}

/* حلقه چرخان */
.page-loader-ring {
  position: relative;
  display: inline-block;
  margin-bottom: 18px;
}

.page-loader-ring-outer {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #3f4f9a;
  border-right-color: #6c8bc7;
  animation: chakavakSpinLoading 1s linear infinite;
}

.page-loader-ring-inner {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-bottom-color: #a8bce0;
  animation: chakavakSpinLoading 1.5s linear infinite reverse;
}

.page-loader-image {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #f5f7fd;
  padding: 12px;
  box-shadow: 0 4px 15px rgba(63, 79, 154, 0.08);
  position: relative;
  z-index: 1;
}

.page-loader-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  animation: chakavakPulseLoading 1.5s ease-in-out infinite;
}

.page-loader-text {
  color: #3f4f9a;
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 5px 0;
  letter-spacing: 0.5px;
}

.page-loader-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.page-loader-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f4f9a;
  animation: chakavakBounceLoading 1.4s ease-in-out infinite both;
}

.page-loader-dot:nth-child(1) {
  animation-delay: 0s;
}
.page-loader-dot:nth-child(2) {
  animation-delay: 0.16s;
  background: #5a74b5;
}
.page-loader-dot:nth-child(3) {
  animation-delay: 0.32s;
  background: #8a9ed4;
}

/* انیمیشن‌ها */
@keyframes chakavakProgressBarLoading {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes chakavakSpinLoading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes chakavakPulseLoading {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
}

@keyframes chakavakBounceLoading {
  0%,
  80%,
  100% {
    transform: translateY(0) scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-8px) scale(1);
    opacity: 1;
  }
}
