/* PS Upload Zone — base styles */

.ps-upload-placeholder {
  display: block;
}

.ps-upload-zone {
  position: relative;
  font-family: inherit;
  box-sizing: border-box;
  overflow: hidden;
}

/* ── Drop area ── */

.ps-drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap: 10px; */
  padding: 24px 16px;
  transition: background 0.15s;
}

.ps-drag-over .ps-drop-area {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* ── Header line: icon + text on one row (Type 2) ── */
/* When header_text is empty nothing renders here (Types 1 & 3) */

.ps-header-line {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: inherit;
  margin-bottom: 12px;
  width: 100%;
}

.ps-header-line span {
  line-height: 1.3;
}

.ps-subheader {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: #666;
  width: 100%;
}

/* Full-width block button for card / full variants */
.ps-btn-pick {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  padding: 20px;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.15s;
  line-height: 1.4;
  text-align: center;
}

.ps-btn-pick:hover {
  opacity: 0.85;
}

/* Type 2 & 3: compact padding on small screens, full padding from lg up */
.ps-type2 .ps-btn-pick,
.ps-type3 .ps-btn-pick {
  padding: 12px;
}

@media (min-width: 992px) {
  .ps-type2 .ps-btn-pick,
  .ps-type3 .ps-btn-pick {
    padding: 16px;
  }
}

/* Minimal variant — keep button inline, not full-width */
.ps-minimal .ps-btn-pick {
  display: inline-flex;
  width: auto;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 18px;
}

/* ── Minimal variant ── */

.ps-minimal .ps-drop-area {
  flex-direction: row;
  justify-content: flex-start;
  padding: 6px 0;
  gap: 10px;
}

.ps-minimal .ps-filename {
  font-size: 0.85rem;
  color: #555;
  word-break: break-all;
}

/* ── Type 1: no card by default — JS adds card styling on success ── */

.ps-type1 {
  background: transparent;
  border: none;
}

.ps-type1 .ps-drop-area {
  padding: 0;
}

/* Type 1 preview state: card styling applied via JS on success */

/* ── Type 2: card with header line + button ── */

.ps-type2 .ps-drop-area {
  padding: 12px;
  flex-direction: column;
  align-items: stretch;
}

@media (min-width: 992px) {
  .ps-type2 .ps-drop-area {
    padding: 20px;
  }
}

/* ── Type 3: card with button only ── */

.ps-type3 .ps-drop-area {
  padding: 12px 14px;
  flex-direction: column;
  align-items: stretch;
}

/* ── Custom layout: zero out the wrapper — user's HTML/CSS has full control ── */

.ps-custom .ps-drop-area {
  padding: 0;
  background: transparent;
  align-items: stretch;
}

/* ── Close button — icon + position handled by icon-close-filled + Bootstrap classes ── */

.ps-btn-remove-x {
  /* background: none; */
  border: none;
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  position: absolute;
  top: 10px;
  right: 15px;
}

/* ── Upload-in-progress state ── */

.ps-upload-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 4px;
  text-align: center;
}

.ps-info-size {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

.ps-info-name {
  font-size: 0.85rem;
  color: #666;
  word-break: break-all;
  margin-bottom: 12px;
}

.ps-spin-wrap {
  margin: 4px 0;
}

.ps-spin {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ddd;
  border-top-color: #555;
  border-radius: 50%;
  animation: ps-spin 0.7s linear infinite;
}

@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

.ps-spin-text {
  font-size: 0.85rem;
  color: #555;
  margin-top: 6px;
}

/* ── Error ── */

.ps-error {
  padding: 8px 0;
  /* background: #fff5f5; */
  color: #c00;
  font-size: 1rem;
  /* border-left: 3px solid #c00; */
  margin: 4px 0;
}

/* ── Success / preview state ── */

.ps-preview {
  padding: 16px;
  text-align: center;
}

.ps-preview-img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
  margin: 0 auto 10px;
  display: block;
  
  /* Card Effect Properties */
  background-color: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ps-preview-filename {
  display: block;
  font-size: 1rem;
  color: #555;
  margin-bottom: 8px;
  word-break: break-all;
}

/* Inline success text below the image */
.ps-success-inline {
  font-size: 1rem;
  color: #1a7a35;
  font-weight: 500;
}

/* Minimal variant inline success */
.ps-minimal .ps-success-inline {
  font-size: 1rem;
  color: #1a7a35;
  margin-top: 4px;
}
