/* Photo upload UI for the inspection request form */

.photo-upload {
  margin-bottom: 18px;
}

.photo-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}

.photo-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 4px 0 10px;
  line-height: 1.5;
}

.photo-upload input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1.5px dashed #c9d0da;
  border-radius: var(--radius);
  background: #fbfcff;
  color: var(--muted);
  font-family: "Open Sans", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color var(--trans), background var(--trans);
}

.photo-upload input[type="file"]:hover,
.photo-upload input[type="file"]:focus {
  border-color: var(--accent);
  background: #fffdf8;
  outline: none;
}

.photo-upload input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.photo-upload input[type="file"]::file-selector-button:hover {
  background: var(--navy-mid);
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.photo-preview:empty {
  display: none;
}

.photo-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dde3ee;
  background: #eef2f7;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--trans);
}

.photo-remove:hover,
.photo-remove:focus {
  background: #b91c1c;
  outline: none;
}

.upload-status {
  font-size: 0.82rem;
  margin-top: 8px;
  min-height: 1.1em;
  color: var(--muted);
}

.upload-status[data-tone="warn"] {
  color: #b45309;
}

.upload-status[data-tone="ok"] {
  color: #15803d;
}
