/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
*/

.offers-tool {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.offers-tool__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.offers-tool__offer {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  background-color: #ffffff;
  box-shadow: 0 10px 25px -20px rgba(15, 23, 42, 0.45);
}

.offers-tool__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.offers-tool__header-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
}

.offers-tool__remove-button {
  border: 1px solid #fca5a5;
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  background-color: #fef2f2;
  color: #b91c1c;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.offers-tool__remove-button:hover {
  background-color: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.offers-tool__remove-button:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

.offers-tool__fields {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.offers-tool__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.offers-tool__field--compact {
  flex: 1;
}

.offers-tool__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #6b7280;
}

.offers-tool__hint {
  font-size: 0.8rem;
  color: #9ca3af;
}

.offers-tool__control {
  width: 100%;
}

.offers-tool__input,
.offers-tool__textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #f9fafb;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.offers-tool__textarea {
  min-height: 120px;
  resize: vertical;
}

.offers-tool__input:focus-visible,
.offers-tool__textarea:focus-visible {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background-color: #ffffff;
}

.offers-tool__image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.offers-tool__image-preview {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
  background-color: #f3f4f6;
  padding: 0.5rem;
}

.offers-tool__upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border: 1px solid #6366f1;
  border-radius: 9999px;
  background-color: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}

.offers-tool__upload-button:hover {
  background-color: #e0e7ff;
  border-color: #4f46e5;
  color: #3730a3;
}

.offers-tool__upload-button .offers-tool__file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.offers-tool__size {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.offers-tool__size .offers-tool__field {
  flex: 1 1 140px;
  margin: 0;
}

.offers-tool__size .offers-tool__input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.offers-tool__add-button {
  align-self: flex-start;
  border: 2px dashed #c7d2fe;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  background-color: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.offers-tool__add-button:hover {
  background-color: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.offers-tool__add-button:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .offers-tool__fields {
    gap: 1.25rem;
  }

  .offers-tool__field--compact .offers-tool__label {
    font-size: 0.75rem;
  }
}
