.text-user {
  text-transform: none;
}

.namecard {
  margin-top: 30px;
  margin-left: 90px;
}

#namecard-form,
.right-form-register-item {
  display: flex;
  gap: 32px;
}

.left-form-register,
.right-form-register {
  width: 50%;
}

.right-form-register h2 {
  color: #000;
  font-weight: 500;
}

.left-form-register {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.left-form-register strong {
  font-size: 20px;
  font-weight: 600;
}

.namecard-left {
  display: flex;
  justify-content: space-between;
  width: 60%;
  gap: 50px;
  margin-top: 20px;
}

.namecard-left-item,
.upload-box-wrapper,
.upload-flex-col-wapper {
  width: 50%;
}

.namecard-left-item span {
  color: #000;
  font-size: 14px;
}

.namecard-all {
  display: flex;
  gap: 80px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 42px 40px 42px;
}

#namecard-form {
  padding: 0 42px 40px 42px;
}

.namecard-right {
  margin-top: 20px;
}

.namecard-right h2 {
  margin-bottom: 24px;
  color: #000;
}

.nkd-change-avatar.is-loading {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.nkd-actions button {
  background: #132441;
  box-shadow: 0 0 12px 0 rgba(255, 255, 255, 0.25) inset;
  text-transform: none;
  border-radius: 10px;
}

.button-save-downl button,
.button-save-downl a,
.button-save-downl button:hover,
.button-save-downl a:hover {
  background: none;
  border: none;
  box-shadow: none;
  margin-bottom: 0px;
}

.button-save-downl a {
  display: flex;
  align-items: center;
}

.button-save-downl button img {
  width: 24px;
}

.button-save-downl .nkd-change-avatar img,
.button-save-downl .nkd-change-image-after img {
  width: 24px;
}

.button-save-downl a img {
  width: 24px;
}

.form-namecard li {
  margin-left: 0 !important;
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 18px;
}

.form-namecard {
  list-style: none;
  display: grid;
  gap: 10px;
  width: fit-content;
}

.nkd-namecard-list {
  margin-top: 20px;
}

.button-save-downl {
  display: flex;
  gap: 12px;
  justify-content: space-around;
  position: absolute;
  bottom: 0px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px);
  width: 100%;
  border-bottom-right-radius: 12px;
  border-bottom-left-radius: 12px;
  padding: 8px;
}

.nkd-fields {
  color: #000;
}

.nkd-fields p,
.form-namecard li a {
  font-size: 18px;
  color: #000;
}

.nkd-fields .nkd-input {
  border-radius: 10px;
  margin-bottom: 0;
}

.nkd-fields .nkd-avatar-wrap .height-img,
.nkd-image-extra {
  height: 240px;
  object-fit: cover;
}

.nkd-avatar-wrap,
.nkd-image-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  height: 240px;
}

.nkd-avatar-wrap img,
.nkd-image-wrap img {
  height: auto;
}

.nkd-avatar-wrap .button-save-downl,
.nkd-image-wrap .button-save-downl {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.nkd-avatar-wrap:hover .button-save-downl,
.nkd-image-wrap:hover .button-save-downl {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  cursor: pointer;
}

.nkd-avatar-wrap a {
  margin-bottom: 0px;
}

.nkd-namecard-form-container {
  width: fit-content;
}

#content .button-register button {
  border-radius: 8px;
  border: 1px solid #b5b5b5;
  background: #fff;
  color: #132441;
  box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, 0.2);
  width: 30%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#content .button-register-2 button {
  border-radius: 8px;
  border: 1px solid #b5b5b5;
  background: #fff;
  color: #132441;
  box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, 0.2);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.button-register {
  margin-top: 42px;
}

#namecard-form input {
  height: 40px !important;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 16px;
  margin-bottom: 0;
  color: #000;
  font-weight: 500 !important;
}

.title-form-left {
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #bebebe;
  width: 100%;
  color: #000;
}

.title-img-namecard strong {
  color: #000;
  font-weight: 600;
}

.upload-container,
.upload-container-wapper {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.upload-box {
  position: relative;
  width: 100%;
  height: 200px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.upload-box img {
  width: 60px;
  height: 50px;
}

.upload-label {
  margin-top: 10px;
  font-weight: 300;
  text-align: center;
  color: #000;
}

#namecard-form .file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100% !important;
  opacity: 0;
  z-index: 3;
  bottom: 0;
  cursor: pointer;
}

#namecard-form {
  margin-top: 20px;
}

.upload-container-wapper {
  display: flex;
}

.upload-flex-col {
  width: 100%;
}

.hidden-input {
  display: none;
}

/* Ẩn nkd-actions mặc định, chỉ hiển thị khi click edit-info-namecard */
.nkd-actions {
  display: none;
}

/* Hiển thị nkd-actions khi có class show */
.nkd-actions.show {
  display: flex;
  margin-top: 20px;
}

/* Ẩn button "Sửa nhanh" vì đã có "Chỉnh sửa thông tin danh thiếp" trong UM dropdown */
.nkd-edit-inline {
  display: none !important;
}

/* Style cho placeholder khi chưa có ảnh */
.nkd-avatar-wrap em,
.nkd-image-wrap em {
  display: block;
  text-align: center;
  padding: 60px 20px;
  background: #f5f5f5;
  border: 2px dashed #ddd;
  border-radius: 12px;
  color: #999;
  font-style: normal;
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

/* Upload badge khi đã chọn ảnh */
.upload-badge {
  animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hiệu ứng khi hover vào upload box có ảnh */
.upload-box:hover img {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Style cho upload box khi đã có ảnh */
.upload-box.has-image {
  border-color: #4caf50;
  border-style: solid;
}

/* Button share thông tin hóa đơn */
.nkd-share-invoice {
  border-radius: 8px;
  border: 1px solid #b5b5b5;
  text-transform: none;
  color: #fff;
  box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 32px;
  font-size: 20px;
  background: #132441;
}

.nkd-share-invoice:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modal share thông tin hóa đơn */
.nkd-share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nkd-share-modal.show {
  opacity: 1;
  visibility: visible;
}

.nkd-share-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.nkd-share-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.nkd-share-modal.show .nkd-share-content {
  transform: scale(1);
}

.nkd-share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.nkd-share-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #132441;
}

.nkd-share-close {
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.nkd-share-close:hover {
  color: #333;
}

.nkd-share-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nkd-share-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
  resize: vertical;
  white-space: pre-wrap;
}

.nkd-share-textarea:focus {
  outline: none;
  border-color: #28a745;
  background: white;
}

.nkd-share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nkd-share-buttons button {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.nkd-share-copy {
  background: linear-gradient(87deg, #28a745 7.59%, #1e7e34 92.41%);
  color: white;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.nkd-share-copy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.nkd-share-copy:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nkd-share-native {
  background: linear-gradient(87deg, #007bff 7.59%, #0056b3 92.41%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.nkd-share-native:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.nkd-share-buttons .icon {
  font-size: 18px;
}

.nkd-share-message {
  display: none;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn 0.3s ease;
}

.nkd-share-message.show {
  display: block;
}

.nkd-share-message .success {
  color: #28a745;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nkd-share-message .error {
  color: #dc3545;
}

.nkd-share-message .info {
  color: #007bff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Share platforms section */
.nkd-share-section {
  margin-bottom: 16px;
}

.nkd-share-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nkd-share-platforms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.nkd-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 80px;
}

.nkd-platform-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #ccc;
}

.nkd-platform-btn .platform-icon {
  font-size: 28px;
  line-height: 1;
}

.nkd-platform-btn .platform-name {
  font-size: 12px;
  font-weight: 500;
  color: #333;
}

/* Màu đặc trưng cho từng platform */
.nkd-share-facebook:hover {
  background: #f0f7ff;
  border-color: #1877f2;
}

.nkd-share-telegram:hover {
  background: #f0f9ff;
  border-color: #0088cc;
}

.nkd-share-whatsapp:hover {
  background: #f0fdf4;
  border-color: #25d366;
}

.nkd-share-zalo:hover {
  background: #f0f9ff;
  border-color: #0068ff;
}

.namecard-right strong {
  color: #000;
}

/* Responsive cho mobile */
@media (max-width: 768px) {
  .nkd-share-content {
    width: 95%;
    padding: 16px;
    max-height: 90vh;
  }

  .nkd-share-header h3 {
    font-size: 18px;
  }

  .nkd-share-buttons {
    flex-direction: column;
  }

  .nkd-share-buttons button {
    width: 100%;
    min-width: auto;
  }

  .nkd-share-textarea {
    min-height: 150px;
    font-size: 13px;
  }

  .nkd-share-platforms {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .nkd-platform-btn {
    min-height: 70px;
    padding: 10px 6px;
  }

  .nkd-platform-btn .platform-icon {
    font-size: 24px;
  }

  .nkd-platform-btn .platform-name {
    font-size: 11px;
  }

  .namecard {
    margin-left: 0px;
  }

  .namecard-all,
  #namecard-form {
    flex-direction: column-reverse;
    padding: 0 15px 20px 15px;
    gap: 20px;
  }

  .namecard-left {
    flex-direction: column;
    width: 100%;
    gap: 20px;
    margin-top: 0;
  }

  .namecard-left-item {
    width: 100%;
  }

  .form-namecard {
    gap: 4px;
  }

  .form-namecard li {
    font-size: 14px;
    margin-top: 8px;
  }

  .form-namecard li a {
    font-size: 14px;
  }

  .nkd-share-invoice {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: 14px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .namecard-right {
    width: 100%;
  }

  .nkd-avatar-wrap,
  .nkd-image-wrap {
    height: 200px;
  }

  .left-form-register,
  .right-form-register,
  .upload-box-wrapper {
    width: 100%;
  }

  .right-form-register h2 {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .right-form-register-item .upload-label {
    font-size: 14px;
  }

  .upload-container {
    flex-direction: column;
  }

  .left-form-register {
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
  }

  #namecard-form input {
    margin-top: 8px;
  }

  .upload-box img {
    width: 50px;
    height: 40px;
  }

  #content .button-register-2 button {
    width: 100%;
    margin-right: 0;
    cursor: pointer;
  }

  #content .button-register button {
    display: none;
  }

  .button-register {
    margin-top: 10px;
  }

  .title-img-namecard strong,
  .left-form-register strong {
    font-size: 14px;
  }
}

/* ========================================
   Auto-crop Loading Spinner
   ======================================== */
.upload-processing {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.upload-processing .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

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

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

.upload-processing p {
  margin: 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}
