/* ==================================================
   IMAGE UPLOADER STYLES
   ================================================== */

.img-upload-section {
  grid-column: 1 / -1;
}

.img-tabs-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.img-tab-btn {
  background: #f1f5f9;
  border: 1.5px solid #e5e7eb;
  color: #475569;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.img-tab-btn:hover {
  background: #e2e8f0;
  color: #0b2545;
}
.img-tab-btn.active {
  background: #0b2545;
  color: #fff;
  border-color: #0b2545;
}

.img-panel {
  display: none;
  background: #f8fafc;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.img-panel.active {
  display: block;
}

.img-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 26px;
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.img-upload-area:hover {
  border-color: #e63946;
  background: #fef2f2;
  transform: translateY(-2px);
}
.img-upload-icon {
  font-size: 40px;
  flex-shrink: 0;
}
.img-upload-text strong {
  display: block;
  color: #0b2545;
  font-size: 14px;
  margin-bottom: 4px;
}
.img-upload-text small {
  color: #94a3b8;
  font-size: 12px;
}

.img-upload-status {
  margin-top: 12px;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.img-upload-status.show {
  display: block;
}
.img-upload-status.success {
  background: #ecfdf5;
  color: #065f46;
  border-left: 3px solid #2a9d8f;
}
.img-upload-status.error {
  background: #fef2f2;
  color: #b91c1c;
  border-left: 3px solid #e63946;
}
.img-upload-status.loading {
  background: #eff6ff;
  color: #1e40af;
  border-left: 3px solid #3b82f6;
}

.img-existing-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}
.img-existing-item {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.img-existing-item:hover {
  border-color: #e63946;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230,57,70,0.15);
}
.img-existing-item img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 5px;
}
.img-existing-item small {
  display: block;
  font-size: 10px;
  color: #64748b;
  word-break: break-all;
  line-height: 1.2;
}

.img-preview-box {
  position: relative;
  background: #fff;
  border: 2px solid #2a9d8f;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-top: 12px;
}
.img-preview-box img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto;
}
.img-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #fef2f2;
  color: #e63946;
  border: 1px solid #fecaca;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.img-remove-btn:hover {
  background: #e63946;
  color: #fff;
}
.img-preview-name {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  word-break: break-all;
}

.img-url-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.img-url-input:focus {
  border-color: #e63946;
  box-shadow: 0 0 0 3px rgba(230,57,70,0.1);
}
.img-url-hint {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .img-tab-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 11.5px;
  }
  .img-upload-area {
    padding: 18px;
    flex-direction: column;
    text-align: center;
  }
  .img-upload-icon {
    font-size: 32px;
  }
  .img-existing-list {
    grid-template-columns: repeat(3, 1fr);
  }
}