
/* === POPUP CORE === */
.swal2-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1050;
}

.swal2-popup {
	background: #fff;
	padding: 1.5rem;
	border-radius: 10px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	max-width: 420px;
	width: 90%;
	text-align: center;
	animation: popup-in 0.3s ease-out forwards;
}

@keyframes popup-in {
	0% {
		transform: scale(0.9);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.swal2-html-container {
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #555;
  /* .my-swal-popup is a flex column with align-items:center, so without this
     the container shrink-wraps to its own content width instead of the popup's
     fixed width — long nowrap text (e.g. a company name) then widens everything
     inside it, including any progress bar, inconsistently between renders. */
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
}

.swal2-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.my-swal-confirm,
.my-swal-cancel {
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.my-swal-confirm {
  background-color: #3085d6;
  color: white;
}

.my-swal-cancel {
  background-color: #d33;
  color: white;
}

/* === CUSTOM CLASS STYLES === */
.my-swal-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #333;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.my-swal-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: #333;
}

.my-swal-icon {
	font-size: 1rem;
	margin-bottom: 0.75rem;
	color: #f8bb86;
}

/* === LOADER === */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  animation: rotate 1s linear infinite;
  margin-bottom: 0.75rem;
}

.loader-spinner .path {
  stroke: #3085d6;
  stroke-linecap: round;
  stroke-width: 4;
  fill: none;
  animation: dash 1.5s ease-in-out infinite;
}

.loader-text {
  font-size: 1rem;
  color: #444;
  text-align: center;
}

/* === BULK SYNC PROGRESS === */
.sync-progress {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-top: 0.5rem;
}

.sync-progress-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
}

.sync-progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #3085d6;
  transition: width 0.25s ease;
}

.sync-progress-count {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.sync-progress-company {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #777;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* === TOAST === */
@keyframes toast-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.my-toast-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1055;
  max-width: 320px;
  width: auto;
  padding: 0.75rem 1.25rem 0.5rem 1.25rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: toast-in 0.3s ease-out;
  overflow: hidden;
}

.my-toast-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.5rem;
}

.checkmark {
  width: 36px;
  height: 36px;
}

.my-toast-message {
  font-size: 0.95rem;
  font-weight: 500;
  flex: 1;
  white-space: normal;
  word-break: break-word;
}

.my-toast-message.toast-success {
  color: #166534;
}

.my-toast-message.toast-error {
  color: #dc2626;
}

.my-toast-progress {
  height: 4px;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.my-toast-progress.toast-success {
  background: #22c55e;
}

.my-toast-progress.toast-error {
  background: #dc2626;
}

.toast-warning {
  color: #eab308; /* Tailwind amber-500 */
  border-color: #facc15;
  background-color: #fffbea;
}

.checkmark.warning line {
  stroke: #eab308;
}

.checkmark.warning circle {
  stroke: #eab308;
}


.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

/* === CHECKMARK BASE === */
.checkmark {
  width: 36px;
  height: 36px;
  stroke-linecap: round;
  stroke-width: 3;
}

/* === SUCCESS (✔️) === */
.checkmark.success .checkmark-circle {
  stroke: #22c55e;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  transform-origin: 50% 50%;
  animation: checkmark-circle-anim 0.6s ease-in-out forwards;
}

.checkmark.success .checkmark-check {
  stroke: #22c55e;
  stroke-width: 4;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmark-check-anim 0.3s ease-in-out 0.6s forwards;
}

/* === ERROR (❌) === */
.toast-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkmark.error .cross-line-1,
.checkmark.error .cross-line-2 {
  stroke: #dc2626;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: cross-line-anim 0.25s ease-in-out forwards;
}

.checkmark.error .cross-line-2 {
  animation-delay: 0.2s;
}

/* === WARINING (❌) === */

.checkmark.warning line {
  stroke: #eab308;
  stroke-width: 4;
  stroke-dasharray: 15;
  stroke-dashoffset: 15;
  animation: warning-line-anim 0.4s ease-out forwards;
}

.checkmark.warning circle {
  stroke: #eab308;
  stroke-width: 3;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: warning-circle-anim 0.5s ease-out forwards;
}


/* === ANIMATIONS === */
@keyframes checkmark-circle-anim {
  0% {
    stroke-dashoffset: 166;
    transform: rotate(0);
  }
  100% {
    stroke-dashoffset: 0;
    transform: rotate(360deg);
  }
}

@keyframes checkmark-check-anim {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes cross-line-anim {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes warning-circle-anim {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes warning-line-anim {
  to {
    stroke-dashoffset: 0;
  }
}



/* === INPUT STATES === */
.invalid-input {
	border: 1px solid red !important;
}

.valid-input {
	border: 1px solid #ccc !important;
}


.my-swal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9998;
}
