/* Subscription Success Modal Styling */
.subscription-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.subscription-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  z-index: 10000;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Loading state for subscribe button */
.subscribe-button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.subscribe-button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: button-loading-spinner 0.8s linear infinite;
}

@keyframes button-loading-spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Active states */
.subscription-modal.active,
.subscription-modal-overlay.active {
  display: block;
}

/* Modal content */
.subscription-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Close button */
.subscription-modal-close {
  position: absolute;
  top: -20px;
  right: -20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Success icon */
.subscription-modal-icon {
  margin-bottom: 24px;
}

/* Title */
.subscription-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #00833f;
  margin: 0 0 12px 0;
  padding: 0;
  line-height: 1.3;
}

/* Message */
.subscription-modal-message {
  font-size: 16px;
  color: #333333;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

#subscription-category-name {
  font-weight: 600;
}

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

@keyframes scaleIn {
  from {
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

.subscription-modal.active {
  animation: scaleIn 0.3s ease-out forwards;
}

.subscription-modal-overlay.active {
  animation: fadeIn 0.3s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .subscription-modal {
    padding: 30px 20px;
    max-width: 340px;
  }

  .subscription-modal-title {
    font-size: 20px;
  }

  .subscription-modal-message {
    font-size: 14px;
  }
}

/* Multi-select Dropdown Styling (Consolidated) */
.custom-multi-select-dropdown {
  position: relative;
  width: 100%;
  border-radius: 50px;
  color: var(--color-gray-500);
  cursor: pointer;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Align content to the right */
  padding: 0 20px;
  box-sizing: border-box; /* Include padding in element's total width and height */
}

.dropdown-header {
  display: flex;
  justify-content: flex-end; /* Align content to the right */
  align-items: center;
  width: 100%;
  height: 100%;
}

.selected-items-display {
  flex-grow: 1;
  text-align: right; /* Align text to the right */
  padding-right: 10px; /* Space between text and arrow */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-arrow {
  margin-left: 5px; /* Adjust spacing if needed */
  transition: transform 0.3s ease;
}

.custom-multi-select-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-options {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 99;
  margin-top: 10px;
  display: none;
}

.dropdown-option-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: var(--color-black);
  justify-content: flex-end;
}

.dropdown-option-item:hover {
  background-color: var(--color-brown-100);
}

.custom-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-brown-600);
  background-color: var(--color-white);
  display: inline-block;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 10px;
  order: 1;
}

.custom-checkbox.checked {
  background-color: var(--color-brown-600);
  border-color: var(--color-brown-600);
}

.custom-checkbox.checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dropdown-option-item .custom-checkbox-label {
  margin-right: auto;
  margin-left: 0;
}
