.upm-popup-container {
  background: linear-gradient(135deg, #fcebc4 0%, #fcedc8 50%, #fce1a8 100%);
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 400px;
  margin: 0 auto;
  font-family: "Arial", sans-serif;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.upm-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #000;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  line-height: 1;
}

.upm-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000;
}

.upm-subtitle {
  font-size: 14px;
  color: #777;
  margin-bottom: 25px;
  line-height: 1.4;
}

.upm-input-group {
  background: #fdfdfd;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.upm-input-group-textarea {
  align-items: flex-start;
}

.upm-icon-phone,
.upm-icon-user,
.upm-icon-email,
.upm-icon-desc,
.upm-icon-social {
  color: #888;
  margin-right: 10px;
  font-size: 18px;
}

.upm-phone-input,
.upm-text-input,
.upm-textarea {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 16px;
  color: #333;
}

.upm-textarea {
  font-family: inherit;
  resize: none;
  line-height: 1.4;
}

.upm-file-upload-wrapper {
  position: relative;
  margin-bottom: 25px;
}

.upm-file-label {
  background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.upm-icon-paperclip {
  color: #555;
  margin-right: 10px;
  font-size: 18px;
}

.upm-upload-text {
  flex-grow: 1;
  text-align: left;
  font-weight: bold;
  color: #333;
}

.upm-select-file-btn {
  background: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  color: #555;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#upm-file-upload {
  display: none;
}

/* File List Styles */
#upm-file-list {
  margin-top: 10px;
  text-align: left;
}

.upm-file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  padding: 5px 10px;
  margin-bottom: 5px;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
}

.upm-file-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85%;
}

.upm-file-status {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upm-check {
  color: green;
  font-weight: bold;
}

.upm-error {
  color: red;
  font-weight: bold;
  font-size: 18px;
}

.upm-spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #555;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  animation: spin 1s linear infinite;
}

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

.upm-messenger-section {
  margin-bottom: 25px;
}

.upm-messenger-section p {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
}

.upm-messengers {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.upm-messenger-option {
  cursor: pointer;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}

.upm-messenger-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.upm-messenger-option:hover .upm-messenger-icon {
  transform: scale(1.1);
  -webkit-transform: scale(1.1);
}

.upm-messenger-option input:checked + .upm-messenger-icon {
  transform: scale(1.1);
  -webkit-transform: scale(1.1);
  box-shadow: 0 0 0 3px #000;
  -webkit-box-shadow: 0 0 0 3px #000;
  border-radius: 50%;
}

/* Removed hover scale from icon itself to avoid double scaling */
.upm-messenger-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  position: relative;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.upm-messenger-icon.whatsapp {
  background-image: url("https://res.cloudinary.com/dr5eslqec/image/upload/v1770044966/loy4qckriogckwcebe5b.png");
}

.upm-messenger-icon.telegram {
  background-image: url("https://res.cloudinary.com/dr5eslqec/image/upload/v1770044966/ycgpauqrwt8bedae5i4z.png");
}

.upm-messenger-icon.facebook {
  background-image: url("https://res.cloudinary.com/dr5eslqec/image/upload/v1770044966/vg1uuirvpsfqswknvoh1.png");
}

.upm-messenger-icon.viber {
  background-image: url("https://res.cloudinary.com/dr5eslqec/image/upload/v1770050550/rakuten-viber-new-icon7993.logowik.com_%D0%BA%D0%BE%D0%BF%D0%B8%D1%8F_msi5un.png");
}

.upm-submit-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 12px 50px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: background 0.2s;
  width: 100%;
}

.upm-submit-btn:hover {
  background: #f9f9f9;
}

.upm-message {
  margin-top: 15px;
  font-size: 14px;
}
.upm-message.success {
  color: green;
}
.upm-message.error {
  color: red;
}

/* Success Message Styles */
.upm-success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  height: 100%;
}

.upm-success-icon {
  width: 80px;
  height: 80px;
  background: #4caf50; /* Green background */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.upm-checkmark {
  width: 25px;
  height: 45px;
  border: solid white;
  border-width: 0 5px 5px 0;
  transform: rotate(45deg);
  margin-top: -10px;
}

/* Global Popup Overlay */
#upm-global-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: none; /* Controlled by JS */
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

/* Animations */
.fadeIn {
  animation: fadeIn 0.5s forwards;
}

.fadeOut {
  animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.slideInUp {
  animation: slideInUp 0.5s forwards;
}

.slideOutDown {
  animation: slideOutDown 0.5s forwards;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.zoomIn {
  animation: zoomIn 0.5s forwards;
}

.zoomOut {
  animation: zoomOut 0.5s forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes zoomOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.5);
    opacity: 0;
  }
}

/* Responsive Styles */
@media (max-width: 600px) {
  .upm-popup-container {
    width: 90%;
    max-width: 350px;
    padding: 30px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .upm-close-btn {
    top: 10px;
    right: 10px;
    font-size: 28px;
    padding: 5px;
    background: rgba(
      255,
      255,
      255,
      0.5
    ); /* Semi-transparent background for better visibility */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .upm-messengers {
    gap: 10px;
    flex-wrap: wrap;
  }

  .upm-messenger-icon {
    width: 40px;
    height: 40px;
  }

  .upm-input-group {
    padding: 8px 10px;
  }

  .upm-title {
    font-size: 20px;
    margin-top: 10px; /* Give space for close button */
  }
}
