/* Google Forms-style single-file picker */
.rr-file-wrap {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.rr-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rr-file-hint {
  margin: 0 0 2px;
  color: #5f6368;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.rr-file-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.rr-file-add:hover:not(:disabled) {
  background: #f8fbff;
  border-color: #c6daf8;
}

.rr-file-add:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

.rr-file-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rr-file-add[hidden] {
  display: none !important;
}

.rr-file-add-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #1a73e8;
}

.rr-file-add-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.rr-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 420px);
  min-height: 36px;
  padding: 6px 6px 6px 10px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
}

.rr-file-chip[hidden] {
  display: none !important;
}

.rr-file-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: #ea4335;
  color: #fff;
}

.rr-file-chip-icon.is-pdf {
  background: #db4437;
}

.rr-file-chip-icon.is-other {
  background: #5f6368;
}

.rr-file-chip-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.rr-file-chip-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #202124;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.3;
}

a.rr-file-chip-name:hover {
  color: #1a73e8;
  text-decoration: underline;
}

.rr-file-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.rr-file-chip-remove:hover {
  background: #f1f3f4;
  color: #202124;
}

.rr-file-chip-remove:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 1px;
}

.rr-file-preview {
  display: none;
  max-width: min(100%, 280px);
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  object-fit: contain;
  background: #fff;
}

.rr-file-preview.is-visible {
  display: block;
}
