#dsa-settings-spinner {
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#dsa-settings-spinner:not(.hidden) {
  display: flex;
  justify-content: center;
  align-items: center;
}
.dsa-initial-spinner {
  border: 4px solid #eee;
  border-top: 4px solid #666;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  justify-content: center;
  vertical-align: middle;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.diamond-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.diamond-table thead {
  background-color: #f0f0f0;
}

.diamond-table th,
.diamond-table td {
  border-bottom: 1px solid #ddd;
  padding: 0.75rem 0.75rem;
  text-align: left;
}

.diamond-table th {
  font-weight: 600;
  color: #333;
}
.diamond-checkbox {
  display: none;
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.diamond-table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.diamond-table tbody tr {
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
  cursor: pointer;
}

.diamond-table tbody tr:hover {
  background: #f0f0f0;
}

.diamond-table tbody tr.selected {
  background: #e2f0ff;
  box-shadow: inset 0 0 0 2px #3182ce;
}

.diamond-table td {
  color: #555;
}

.icon-toggle-wrapper {
  display: flex;
}

.col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.media-icons {
  display: flex;
  align-items: center;
}

.media-icons button,
.media-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.media-icons button:hover,
.media-icons a:hover {
  background: #f5f5f5;
  border-color: #999;
}

.diamond-icon-static {
  display: inline-block;
  opacity: 0.85;
}
.diamond-icon {
  display: flex;
}
/* Svg div */
.dsa_custom_svg {
  display: flex;
}

/* Responsive */
@media (max-width: 768px) {
  .diamond-table {
    font-size: 1rem;
    width: 100%;
  }
}
#diamond-table-wrapper .loading-overlay {
  position: static;
  width: 100%;
  padding: 2rem 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: auto;
}

#diamond-table-wrapper .loading-overlay:not(.hidden) {
  display: flex;
}
.spinner:empty {
  display: inline-block !important;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #000;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#diamond-table-wrapper.loading-active table,
#diamond-table-wrapper.loading-active #pagination-wrapper {
  display: none;
}
#diamond-table-wrapper.loading-active .loading-overlay {
  display: flex;
}

/* pagination */

#pagination-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

#pagination-wrapper button {
  background-color: transparent;
  text-decoration: underline;
  border: none;
  color: #555;
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

#pagination-wrapper button:hover {
  color: #333;
}

#pagination-wrapper button.active,
#pagination-wrapper button[style*="font-weight:bold"] {
  color: #000;
  font-weight: 600;
  border-color: #ccc;
}

#pagination-wrapper button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f9f9f9;
  color: #aaa;
  border-color: #ddd;
}

@media (max-width: 480px) {
  #pagination-wrapper {
    gap: 0.3rem;
  }

  #pagination-wrapper button {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* Media Modal */
.dsa_media-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
}

.dsa_media-modal.active {
  display: flex;
}

.dsa_media-content {
  width: 530px;
  max-width: 550px;
  aspect-ratio: 1 / 1; /* keeps it square */
  background: transparent;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.dsa_media-content::-webkit-scrollbar {
  display: none !important;
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .dsa_media-content {
    width: 65%;
    max-width: 400px;
  }
}

/* Mobile (≤600px) */
@media (max-width: 600px) {
  .dsa_media-content {
    width: 90%;
    max-width: 90%;
    border-radius: 6px;
  }
}

#dsa-media-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: none;
}

.dsa_media-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  overflow: hidden;
}

.dsa_media-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: black;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
}

.open-media {
  display: flex;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.certificate-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.certificate-media:hover {
  opacity: 0.8;
}

.diamond-dropdowns {
  width: 100%;
  margin-top: 1rem;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .diamond-dropdowns {
    width: 100%;
  }
}

.filter-buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: white;
  border: 1px solid #ccc;
  padding: 8px 14px;
  width: 24%;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
}
.filter-btn:hover {
  background-color: #f2f2f2;
}
.filter-btn.active {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.slider-container {
  margin-top: 5px;
}

.slider-labels {
  display: flex;
  justify-content: space-around;
  font-size: 12px;
  color: #666;
}

.slider-labels span {
  flex: 1;
  text-align: center;
}

.slider-wrapper {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
}

.slider-wrapper input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-appearance: none;
  background: transparent;
  z-index: 3;
  height: 0;
  margin: 0;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  pointer-events: all;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 1px solid #40454bff;
  cursor: pointer;
  -webkit-appearance: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 4;
  margin-top: 0;
  transition: background 0.2s;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb:active {
  background: #40454bff;
}

.slider-wrapper input[type="range"]::-moz-range-thumb {
  pointer-events: all;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 1px solid #40454bff;
  cursor: pointer;
  position: relative;
  z-index: 4;
  transition: background 0.2s;
}

.slider-wrapper input[type="range"]::-moz-range-thumb:active {
  background: #40454bff;
}

.dsa_slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  background: #e0e0e0;
  border-radius: 4px;
  transform: translateY(-50%);
  z-index: 1;
}

.dsa_slider-range {
  position: absolute;
  height: 100%;
  background: #007bff;
  border-radius: 4px;
  left: var(--left, 0%);
  right: calc(100% - var(--right, 100%));
  z-index: 2;
}

.input-pair {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}

.input-pair input {
  width: 100px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.hidden {
  display: none;
}
.range-label {
  font-size: 14px;
}

.filter-buttons .filter-btn.force-active {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
}

/* Summary Box Container */
#diamond-summary-box {
  width: 100%;
  margin-top: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}
@media (max-width: 768px) {
  #diamond-summary-box {
    width: 100%;
  }
}

/* Top Center Header */
.summary-box-header {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 0 10px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 20px;
}

/* Inner content layout */
.summary-box-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 1rem;
}

/* Left Section */
.summary-box-content .left {
  flex: 1;
}

.diamond-info-text,
.diamond-certificate {
  font-size: 14px;
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.diamond-price {
  font-weight: 400;
  font-size: 14px;
  color: #000;
}

/* Certificate link */
.diamond-certificate a {
  color: #007acc;
  text-decoration: underline;
  font-size: 14px;
}

/* Buttons - Base style */
.summary-box-content .btn {
  background: none;
  color: black;
  text-decoration: underline;
  border: none;
  font-size: 14px;
  padding: 0;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Right Section */
.summary-box-content .right {
  position: relative;
  width: 130px;
  text-align: center;
  display: flex;
}

/* Diamond image */
.summary-box-content .right img {
  margin: auto;
  width: 110px;
  height: 110px;
}

/* See Diamond Button - Overlay */
#see-diamond-btn {
  position: absolute;
  font-weight: bold;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  font-size: 12px;
  height: 93%;
  width: 100%;
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Show button on hover */
.summary-box-content .right:hover #see-diamond-btn {
  opacity: 1;
  pointer-events: auto;
}
.cert-link {
  color: black;
}
