/**
 * Form Input Styles
 * Styles for text inputs, textareas, selects, and form items
 */

.dalton-showcase-form {
  font-size: 16px;
}
.dalton-showcase-form input[type='text'],
.dalton-showcase-form input[type='password'],
.dalton-showcase-form input[type='email'],
.dalton-showcase-form input[type='url'],
.dalton-showcase-form input[type='date'],
.dalton-showcase-form input[type='month'],
.dalton-showcase-form input[type='time'],
.dalton-showcase-form input[type='datetime'],
.dalton-showcase-form input[type='datetime-local'],
.dalton-showcase-form input[type='week'],
.dalton-showcase-form input[type='number'],
.dalton-showcase-form input[type='search'],
.dalton-showcase-form input[type='tel'],
.dalton-showcase-form input[type='color'],
.dalton-showcase-form textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  border-radius: 0.2em;
  border-style: solid;
  border-width: 0.1rem;
  box-shadow: none;
  display: block;
  margin: 0;
  max-width: 100%;
  /* padding: 1.5rem 1.8rem; */
  padding: 1.1em 1.4em;
  width: 100%;
}

.dalton-showcase-form select {
  border-radius: 0;
  border-style: solid;
  border-width: 0.1rem;
  box-shadow: none;
  display: block;
  font-size: 1.6rem;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 100%;
  padding: 1.5rem 1.8rem;
  width: 100%;
}

.dalton-showcase-form select[multiple] {
  overflow: auto;
  height: auto;
}

.dalton-showcase-form .ds-form_item {
  margin-top: 2.5em;
}

.dalton-showcase-form .ds-form_input {
  border: solid 1px #ccc;
}

form.dalton-showcase-form .ds-form_input:hover,
.dalton-showcase-form .ds-form_input:focus-visible {
  border-color: rgb(3, 164, 238) !important;
}

form.dalton-showcase-form .ds-form_input:focus-visible {
  border-width: 2px;
  border-color: rgb(3, 164, 238) !important;
}

.ds-form_label {
  font-size: 16px;
  font-weight: 700;
}

/* Info text style */
.ds-form_item .ds-info,
.ds-form_item p.ds-info {
  color: rgb(3, 164, 238);
}

form.dalton-showcase-form.form-submitted input[type='submit'] {
  opacity: 0.5;
}

.ds-input-error_danger {
  color: tomato;
  font-style: italic;
}

/**
 * Button Styles
 * Styles for .ds-btn and standard WordPress buttons
 */

.ds-btn,
.button {
  font-size: 16px;
  display: inline-block;
  font-weight: 400;
  color: #212529;
  text-align: center;
  vertical-align: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: transparent;
  border: 1px solid rgba(126, 126, 126, 0.2);
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-transition: color 0.15s ease-in-out,
    background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  -moz-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -ms-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -o-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.ds-btn:hover:enabled,
.button:hover:enabled {
  background-color: #333;
  color: white;
}

.ds-btn.ds-btn_primary,
.button.button-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.ds-btn.ds-btn_primary:hover,
.button.button-primary:hover {
  color: #fff;
  background-color: #0069d9;
  border-color: #0062cc;
}

.ds-btn-small {
  font-size: 0.85em;
}

/**
 * File Uploader Styles
 * Styles for file upload UI, dropzone, gallery, and upload actions
 */

/* Style the file upload tag */
.ds-inputfile {
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 0.1px;
  z-index: -1;
}

.ds-inputfile + label {
  background: #1f2937;
  color: white;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0.75rem;
  position: relative;
  overflow: hidden;
}

.ds-inputfile + label::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ds-inputfile + label:hover::before {
  opacity: 1;
}

.ds-inputfile:focus + label,
.ds-inputfile.hasfocus + label,
.ds-inputfile + label:hover {
  background: #111827;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.ds-inputfile:focus + label,
.ds-inputfile.has-focus + label {
  outline: 2px solid rgba(0, 0, 0, 0.3);
  outline-offset: 2px;
}

.ds-inputfile + label svg {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.ds-inputfile + label:hover svg {
  transform: scale(1.1);
}

.ds-uploader-gallery-item-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Trash Button Styles */
.ds-btn-trash {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ds-btn-trash svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

.ds-btn-trash:hover {
  background: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
  color: white;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Fade-out animation for removed items */
@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ds-uploader-gallery-item.removing {
  animation: fadeOutScale 0.3s ease-out forwards;
  pointer-events: none;
}

.ds-uploader-gallery-item.restoring {
  animation: fadeInScale 0.3s ease-out forwards;
}

/* Image uploader styles */
form .ds-droparea {
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 2.5rem;
  min-height: 240px;
  background: rgba(249, 250, 251, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

form .ds-droparea::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.02));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

form .ds-droparea:hover::before {
  opacity: 1;
}

form .ds-droparea:hover {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(249, 250, 251, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

img.ds-upload-preview {
  width: 200px;
}
form .ds-droparea-gallery {
  margin: 0;
  width: auto;
  flex: 0;
  transition: all 0.5s ease-out;
}

form .ds-droparea-gallery:not(:empty) {
  --upload-thumb-size: 180px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--upload-thumb-size), 1fr));
  gap: 1.5rem;
  margin: 2rem 0 0;
  flex: 1;
  width: 100%;
  animation: fadeInUp 0.4s ease-out;
}

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

form .ds-droparea-thumb {
  width: 100%;
  height: var(--upload-thumb-size);
  background-size: cover;
  background-position: center;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

form .ds-droparea-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

form .ds-droparea.highlight {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(243, 244, 246, 0.9);
  transform: scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

form .ds-droparea-thumbcontainer {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

form .ds-droparea-thumbcontainer:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

form .ds-droparea-actions {
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(8px);
  position: relative;
}

form .ds-droparea-actions button.ds-icon {
  width: 36px;
  height: 36px;
  background-color: rgba(239, 68, 68, 0.1);
  border: none;
  border-radius: 8px;
  padding: 0;
  margin: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

form .ds-droparea-actions button.ds-icon.ds-icon-trash {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNyA0LjlDMTcgNC45NTUyMyAxNy4wNDQ4IDUgMTcuMSA1TDIwIDVDMjAuNTUyMyA1IDIxIDUuNDQ3NzIgMjEgNkMyMSA2LjU1MjI5IDIwLjU1MjMgNyAyMCA3SDE5LjFDMTkuMDQ0OCA3IDE5IDcuMDQ0NzcgMTkgNy4xVjIxQzE5IDIyLjEwNDYgMTguMTA0NiAyMyAxNyAyM0g3QzUuODk1NDMgMjMgNSAyMi4xMDQ2IDUgMjFWNy4xQzUgNy4wNDQ3NyA0Ljk1NTIzIDcgNC45IDdINEMzLjQ0NzcyIDcgMyA2LjU1MjI5IDMgNkMzIDUuNDQ3NzIgMy40NDc3MiA1IDQgNUw2LjkgNUM2Ljk1NTIzIDUgNyA0Ljk1NTIzIDcgNC45VjNDNyAxLjg5NTQzIDcuODk1NDMgMSA5IDFIMTVDMTYuMTA0NiAxIDE3IDEuODk1NDMgMTcgM1Y0LjlaTTcuMSA3QzcuMDQ0NzcgNyA3IDcuMDQ0NzcgNyA3LjFWMjAuNUM3IDIwLjc3NjEgNy4yMjM4NiAyMSA3LjUgMjFIMTYuNUMxNi43NzYxIDIxIDE3IDIwLjc3NjEgMTcgMjAuNVY3LjFDMTcgNy4wNDQ3NyAxNi45NTUyIDcgMTYuOSA3SDcuMVpNOS4xIDVDOS4wNDQ3NyA1IDkgNC45NTUyMyA5IDQuOVYzLjVDOSAzLjIyMzg2IDkuMjIzODYgMyA5LjUgM0gxNC41QzE0Ljc3NjEgMyAxNSAzLjIyMzg2IDE1IDMuNVY0LjlDMTUgNC45NTUyMyAxNC45NTUyIDUgMTQuOSA1SDkuMVoiIGZpbGw9IiNlZjQ0NDQiLz4KPHJlY3QgeD0iOSIgeT0iMTAiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIHJ4PSIxIiBmaWxsPSIjZWY0NDQ0Ii8+CjxyZWN0IHg9IjEzIiB5PSIxMCIgd2lkdGg9IjIiIGhlaWdodD0iOCIgcng9IjEiIGZpbGw9IiNlZjQ0NDQiLz4KPC9zdmc+Cg==);
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}

form .ds-droparea-actions button.ds-icon:hover {
  background-color: rgba(239, 68, 68, 0.9);
  transform: scale(1.05);
}

form .ds-droparea-actions button.ds-icon-trash:hover {
  background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNyA0LjlDMTcgNC45NTUyMyAxNy4wNDQ4IDUgMTcuMSA1TDIwIDVDMjAuNTUyMyA1IDIxIDUuNDQ3NzIgMjEgNkMyMSA2LjU1MjI5IDIwLjU1MjMgNyAyMCA3SDE5LjFDMTkuMDQ0OCA3IDE5IDcuMDQ0NzcgMTkgNy4xVjIxQzE5IDIyLjEwNDYgMTguMTA0NiAyMyAxNyAyM0g3QzUuODk1NDMgMjMgNSAyMi4xMDQ2IDUgMjFWNy4xQzUgNy4wNDQ3NyA0Ljk1NTIzIDcgNC45IDdINEMzLjQ0NzcyIDcgMyA2LjU1MjI5IDMgNkMzIDUuNDQ3NzIgMy40NDc3MiA1IDQgNUw2LjkgNUM2Ljk1NTIzIDUgNyA0Ljk1NTIzIDcgNC45VjNDNyAxLjg5NTQzIDcuODk1NDMgMSA5IDFIMTVDMTYuMTA0NiAxIDE3IDEuODk1NDMgMTcgM1Y0LjlaTTcuMSA3QzcuMDQ0NzcgNyA3IDcuMDQ0NzcgNyA3LjFWMjAuNUM3IDIwLjc3NjEgNy4yMjM4NiAyMSA3LjUgMjFIMTYuNUMxNi43NzYxIDIxIDE3IDIwLjc3NjEgMTcgMjAuNVY3LjFDMTcgNy4wNDQ3NyAxNi45NTUyIDcgMTYuOSA3SDcuMVpNOS4xIDVDOS4wNDQ3NyA1IDkgNC45NTUyMyA5IDQuOVYzLjVDOSAzLjIyMzg2IDkuMjIzODYgMyA5LjUgM0gxNC41QzE0Ljc3NjEgMyAxNSAzLjIyMzg2IDE1IDMuNVY0LjlDMTUgNC45NTUyMyAxNC45NTUyIDUgMTQuOSA1SDkuMVoiIGZpbGw9IndoaXRlIi8+CjxyZWN0IHg9IjkiIHk9IjEwIiB3aWR0aD0iMiIgaGVpZ2h0PSI4IiByeD0iMSIgZmlsbD0id2hpdGUiLz4KPHJlY3QgeD0iMTMiIHk9IjEwIiB3aWR0aD0iMiIgaGVpZ2h0PSI4IiByeD0iMSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==);
}

.ds-uploader-gallery:not(:empty) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: 2.5rem;
  position: relative;
  padding: 1.5rem;
  background: rgba(249, 250, 251, 0.5);
}

.ds-uploader-gallery:not(:empty):before {
  content: 'Uploaded';
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: white;
  color: #374151;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.ds-uploader-gallery:empty {
  display: none;
}

.ds-uploader-gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ds-uploader-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.ds-uploader-gallery-item img,
.ds-image-icon-placeholder {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ds-uploader-gallery-item:hover img {
  transform: scale(1.05);
}

.ds-image-icon-placeholder {
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e7eb 100%);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  padding: 1rem;
  text-align: center;
  word-break: break-word;
}

.ds-droparea-message {
  padding: 1rem 0 0;
  color: #6b7280;
  font-size: 1.0625rem;
  font-weight: 500;
  text-align: center;
  margin-top: 0.5rem;
}

/* Responsive styles for image uploader */
@media (max-width: 768px) {
  form .ds-droparea {
    padding: 2rem 1.5rem;
    min-height: 200px;
  }

  .ds-uploader-gallery:not(:empty) {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
  }

  form .ds-droparea-gallery:not(:empty) {
    --upload-thumb-size: 140px;
    gap: 1rem;
  }

  .ds-inputfile + label {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  form .ds-droparea {
    padding: 1.5rem 1rem;
    min-height: 180px;
  }

  .ds-uploader-gallery:not(:empty) {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
  }

  form .ds-droparea-gallery:not(:empty) {
    --upload-thumb-size: 120px;
    gap: 0.75rem;
  }

  .ds-uploader-gallery-item img,
  .ds-image-icon-placeholder {
    height: 120px;
  }

  .ds-inputfile + label {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }

  .ds-droparea-message {
    font-size: 0.875rem;
  }

  .ds-toggle-switch {
    gap: 0.5rem;
  }

  .ds-toggle-label {
    font-size: 0.8125rem;
  }

  .ds-toggle-slider {
    width: 44px;
    height: 24px;
  }

  .ds-toggle-slider::before {
    height: 18px;
    width: 18px;
  }

  .ds-toggle-input:not(:checked) + .ds-toggle-slider::before {
    transform: translateX(20px);
  }
}

/**
 * Notification Styles
 * Alerts, toasts, and error messages
 */

/* Toast Notification Styles */
.ds-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: #1f2937;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90%;
}

.ds-toast.show {
  transform: translateX(-50%) translateY(0);
}

.ds-toast-message {
  font-size: 0.9375rem;
  font-weight: 500;
}

.ds-toast-undo {
  background: white;
  color: #1f2937;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ds-toast-undo:hover {
  background: #f3f4f6;
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .ds-toast {
    bottom: 1rem;
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
  }

  .ds-toast-undo {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
  }
}

/* DS Alert styles */
.ds-alert,
.notice {
  padding: 1.3em 1.8em;
  border: solid 1px rgb(173, 173, 173);
  background-color: rgb(236, 236, 236);
  margin: 2em 0;
}

.ds-alert.ds-alert_danger,
.notice.notice-error,
.ds-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.ds-alert.ds-alert_success,
.notice.notice-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.ds-alert.ds-alert_warning,
.notice.notice-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.ds-alert.ds-alert_info,
.notice.notice-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/**
 * PDF Viewer Styles
 * PDF viewer, gallery, and fullscreen overlay
 */

/* PDF Viewer Fullscreen Styles */
.ds-pdf-viewer-container {
  position: relative;
  width: 100%;
}

.ds-pdf-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5em;
}

.ds-pdf-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.ds-pdf-fullscreen-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

.ds-pdf-fullscreen-btn:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

.ds-pdf-fullscreen-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ds-pdf-iframe {
  display: block;
  border-radius: 0.25rem;
}

/* Fullscreen styles */
.ds-pdf-viewer-container:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.ds-pdf-viewer-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.ds-pdf-viewer-container:-moz-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.ds-pdf-viewer-container:fullscreen .ds-pdf-iframe,
.ds-pdf-viewer-container:-webkit-full-screen .ds-pdf-iframe,
.ds-pdf-viewer-container:-moz-full-screen .ds-pdf-iframe {
  flex: 1;
  width: 100% !important;
  height: calc(100% - 60px) !important;
  border: none;
  border-radius: 0.5rem;
}

.ds-pdf-viewer-container:fullscreen .ds-pdf-controls,
.ds-pdf-viewer-container:-webkit-full-screen .ds-pdf-controls,
.ds-pdf-viewer-container:-moz-full-screen .ds-pdf-controls {
  background: rgba(0, 0, 0, 0.8);
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.ds-pdf-viewer-container:fullscreen .ds-pdf-fullscreen-btn,
.ds-pdf-viewer-container:-webkit-full-screen .ds-pdf-fullscreen-btn,
.ds-pdf-viewer-container:-moz-full-screen .ds-pdf-fullscreen-btn {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
}

.ds-pdf-viewer-container:fullscreen .ds-pdf-fullscreen-btn:hover,
.ds-pdf-viewer-container:-webkit-full-screen .ds-pdf-fullscreen-btn:hover,
.ds-pdf-viewer-container:-moz-full-screen .ds-pdf-fullscreen-btn:hover {
  background-color: rgba(255, 255, 255, 1);
}

/* Hide fullscreen button if not supported */
.no-fullscreen-support .ds-pdf-fullscreen-btn {
  display: none;
}

/* PDF Gallery Wrapper - Container for embedded viewer + thumbnails */
.ds-pdf-gallery-wrapper {
  margin: 1.5em 0;
  background: #f8f9fa;
}

.ds-pdf-gallery-wrapper .ds-pdf-viewer-container {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0;
  margin-bottom: 1em;
  overflow: hidden;
}

.ds-pdf-gallery-wrapper .ds-pdf-iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-top: 1px solid #dee2e6;
  display: block;
}

/* PDF Controls - Enhanced for download button */
.ds-pdf-gallery-wrapper .ds-pdf-controls {
  display: flex;
  gap: 0.5em;
  padding: 0.75em 1em;
  background: white;
  border-bottom: 1px solid #dee2e6;
  align-items: center;
  flex-wrap: wrap;
}

.ds-pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background-color: #0066cc;
  border: 1px solid #0052a3;
  border-radius: 0.25rem;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  font-size: 0.9em;
}

.ds-pdf-download-btn:hover {
  background-color: #0052a3;
  color: white;
}

.ds-pdf-download-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* PDF Thumbnails */
.ds-pdf-thumbnails {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  padding-top: 1em;
  border-top: 1px solid #dee2e6;
}

.ds-pdf-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em;
  border: 2px solid #dee2e6;
  border-radius: 0.25rem;
  cursor: zoom-in;
  transition: all 0.2s ease-in-out;
  min-width: 100px;
  max-width: 150px;
  background: white;
  position: relative;
}

.ds-pdf-thumb:hover {
  border-color: #0066cc;
  background: #f0f7ff;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ds-pdf-thumb:hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 102, 204, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.ds-pdf-thumb:hover::after {
  content: '⛶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  color: white;
  z-index: 2;
  pointer-events: none;
}

.ds-pdf-thumb.active {
  border-color: #0066cc;
  background: #e7f3ff;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.ds-pdf-thumb .ds-pdf-icon {
  color: #dc3545;
  flex-shrink: 0;
}

.ds-pdf-thumb-name {
  font-size: 0.75em;
  text-align: center;
  word-break: break-word;
  color: #495057;
  line-height: 1.3;
}

.ds-pdf-thumb.active .ds-pdf-thumb-name {
  font-weight: 600;
  color: #0066cc;
}

/* PDF Gallery Item Styles - For card/link display mode (attachment/none) */
.ds-pdf-gallery-item {
  margin: 1.5em 0;
  padding: 1em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  display: inline-block;
  max-width: 100%;
}

.ds-pdf-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #495057;
  transition: all 0.2s ease-in-out;
  padding: 1em;
}

.ds-pdf-link:hover {
  color: #0066cc;
  background-color: #e9ecef;
  border-radius: 0.25rem;
}

.ds-pdf-icon {
  color: #dc3545;
  margin-bottom: 0.5em;
}

.ds-pdf-link:hover .ds-pdf-icon {
  color: #c82333;
}

.ds-pdf-filename {
  font-size: 0.95em;
  font-weight: 500;
  text-align: center;
  word-break: break-word;
  max-width: 300px;
}

.ds-pdf-icon-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1em;
  color: #6c757d;
}

.ds-pdf-title {
  font-weight: 500;
  color: #495057;
  margin-left: auto;
  font-size: 0.9em;
}

/* PDF Placeholder Styles (Edit View) */
.ds-pdf-icon-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 0.25rem;
  padding: 1em;
  min-height: 150px;
  width: 150px;
  text-align: center;
}

.ds-pdf-icon-placeholder .ds-pdf-icon {
  color: #dc3545;
  margin-bottom: 0.5em;
}

.ds-pdf-filename-small {
  font-size: 0.75em;
  color: #495057;
  word-break: break-word;
  max-width: 130px;
  line-height: 1.2;
}

.ds-uploader-gallery-item .ds-pdf-icon-placeholder {
  width: 100%;
  height: 100%;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .ds-pdf-gallery-item {
    margin: 1em 0;
  }

  .ds-pdf-filename {
    font-size: 0.875em;
  }

  .ds-pdf-gallery-wrapper .ds-pdf-iframe {
    height: 400px;
  }

  .ds-pdf-thumbnails {
    gap: 0.5em;
  }

  .ds-pdf-thumb {
    min-width: 80px;
    max-width: 100px;
    padding: 0.5em;
  }

  .ds-pdf-thumb .ds-pdf-icon {
    width: 24px;
    height: 24px;
  }

  .ds-pdf-thumb-name {
    font-size: 0.65em;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .ds-pdf-gallery-wrapper .ds-pdf-iframe {
    height: 500px;
  }
}

/* PDF Fullscreen Overlay */
.ds-pdf-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  padding: 1em;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.ds-pdf-fullscreen-overlay.active {
  opacity: 1;
}

.ds-pdf-close-btn {
  position: absolute;
  top: 1em;
  right: 1em;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
  z-index: 10;
}

.ds-pdf-close-btn:hover {
  background: white;
  transform: scale(1.1);
}

.ds-pdf-close-btn svg {
  color: #333;
}

.ds-pdf-overlay-title {
  color: white;
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 1em;
  text-align: center;
  padding-right: 60px;
}

.ds-pdf-overlay-iframe {
  flex: 1;
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: white;
}

@media (max-width: 767px) {
  .ds-pdf-fullscreen-overlay {
    padding: 0.5em;
  }

  .ds-pdf-close-btn {
    width: 40px;
    height: 40px;
    top: 0.5em;
    right: 0.5em;
  }

  .ds-pdf-close-btn svg {
    width: 24px;
    height: 24px;
  }

  .ds-pdf-overlay-title {
    font-size: 1em;
    padding-right: 50px;
  }
}

/**
 * 3D Viewer Styles  
 * Rhino 3D viewer component styles
 */

.ds-rhinoviewer {
  width: 100%;
  max-width: 100%;
  height: 400px;
  background-color: rgb(245, 245, 245);
  border: solid 1px rgb(173, 173, 173);
}

/* Make the viewer canvas responsive */
.ds-rhinoviewer canvas {
  max-width: 100% !important;
  height: auto !important;
  width: 100% !important;
}

/**
 * Posts Grid Styles
 * Grid layout for displaying post submissions
 */

/* Post styles */
.ds-post_item {
  padding-bottom: 1em;
}

/* Posts Grid styles */
.ds-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2em 0;
  padding: 0;
  gap: 24px;
}

.ds-grid_card {
  border: solid 1px lightgrey;
  overflow: hidden;
  padding: 0;
  width: 340px;
}

.ds-grid_card img.attachment-ds-grid-image.wp-post-image {
  object-fit: cover;
  padding: 0;
  margin: 0;
  transition: transform 500ms;
  -webkit-transition: transform 500ms;
  -moz-transition: transform 500ms;
  -ms-transition: transform 500ms;
  -o-transition: transform 500ms;
}

.ds-grid_card:hover img.attachment-ds-grid-image.wp-post-image {
  transform: scale(1.1, 1.1);
  -webkit-transform: scale(1.1, 1.1);
  -moz-transform: scale(1.1, 1.1);
  -ms-transform: scale(1.1, 1.1);
  -o-transform: scale(1.1, 1.1);
}

.ds-grid_card .ds-grid_content {
  padding: 0.6em;
  text-align: center;
}

.ds-grid_card .ds-grid_content .title {
  font-size: 1.5em;
  letter-spacing: -0.08em;
  text-align: center;
  margin: 1rem 0;
  padding: 0;
}

.ds-grid_card .ds-grid_image {
  width: 340px;
  height: 240px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.ds-grid_card p.ds-excerpt {
  text-align: left;
  margin: 0;
}

.ds-grid_card p.ds-excerpt:first-letter {
  display: inherit !important;
  float: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  margin-right: 0 !important;
  margin-top: inherit !important;
  margin-top: inherit !important;
  padding: none !important;
  vertical-align: inherit !important;
}

.ds-grid_card a {
  color: inherit;
}

.ds-grid_card a:hover {
  text-decoration: none;
}

.text-muted {
  color: lightgray;
}

.text-small {
  font-size: 0.8em;
}

.ds-post_alt {
  background: rgba(0, 0, 0, 0.02);
  border: solid 1px rgb(70 192 255);
  margin: 2em 0 3em 0;
  padding: 1em;
  border-radius: 3px;
  box-shadow: 0px 4px 12px rgb(13 75 106 / 17%);
}

div.ds-post_alt h4 {
  margin-top: 0;
  font-style: italic;
}

div.ds-post_alt .ds-post_paragraphs p {
  font-style: italic;
  color: #040404;
}

/**
 * Pagination Styles
 * Page navigation controls
 */

/* Pagination */
ul.page-numbers {
  width: 100%;
  padding: 1em;
  border: solid 1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: row;
  justify-content: center;
}

ul.page-numbers li {
  list-style-type: none;
  margin: 0 1em;
}

/**
 * Filter Styles
 * Search and filter UI components
 */

/* Filter styles */
.ds-show_info {
  color: rgb(3, 164, 238);
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  padding: 0.5rem;
  font-style: italic;
}

div.ds-show_filters form,
div.ds-show_filters {
  align-items: center;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

.ds-show_filters .dalton-showcase-form input[type='text'] {
  margin: 0 1em;
  width: 200px;
  font-size: 0.8em;
  padding: 0.3em 1em;
}

.ds-input-error_danger {
  color: tomato;
  font-style: italic;
}

/**
 * Dalton Showcase Public Styles
 *
 * This is the main entry point for all public-facing CSS.
 * All styles are modularized for better maintainability.
 *
 * Build: webpack bundles this into build/dalton-showcase-public.bundle.css
 * Loaded: Via wp_enqueue_style in public/class-dalton-showcase-public.php:77-82
 *
 * DO NOT edit files in public/css/ - they are legacy files and not loaded.
 * All active styles are defined in src/css/ and bundled by webpack.
 */

