/* Copyright 2025 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

/* #css_wrapper_metadata_start
 * #type=style-lit
 * #scheme=relative
 * #css_wrapper_metadata_end */

#container {
  margin-top: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  height: 24px;
  width: 24px;
}

.spinner-circle {
  animation: spin 1.5s linear infinite;
  fill: none;
  stroke: var(--color-new-tab-page-composebox-upload-button);
  stroke-dasharray: 240;
  stroke-dashoffset: 60;
  stroke-linecap: round;
  stroke-width: 10;
  transform-origin: 50% 50%;
}

.img-thumbnail {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

#imgChip {
  align-items: center;
  border-radius: 8px;
  display: flex;
  height: 52px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 52px;
}

.img-overlay {
  background-color: var(--color-new-tab-page-composebox-file-image-overlay);
  height: 100%;
  left: 0;
  opacity: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

#removeImgButton {
  --cr-icon-button-height: 100%;
  --cr-icon-button-width: 100%;
  --cr-icon-button-fill-color: white;
  --cr-icon-button-icon-size: 24px;
  --cr-icon-button-margin-start: 0px;
  border-radius: 4px;
  display: flex;
}

#pdfChip{
  align-items: center;
  background-color: var(--color-new-tab-page-composebox-file-chip-background);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  height: 36px;
  padding: 8px 16px 8px 12px;
  width: 153px;
}

#pdfThumbnail{
  align-items: center;
  display: flex;
  height: 36px;
  position: relative;
  width: 36px;
}

.pdf-icon {
  background-color: var(--color-new-tab-page-composebox-background);
  box-sizing: border-box;
  border-radius: 4px;
  color: var(--color-new-tab-page-composebox-pdf-chip-icon);
  height: 100%;
  padding: 9px;
  width: 100%;
}

.pdf-overlay {
  height: 100%;
  opacity: 0;
  position: absolute;
  width: 100%;
}

#removePdfButton {
  --cr-icon-button-fill-color:
    var(--color-new-tab-page-composebox-file-chip-text);
  --cr-icon-button-icon-size: 24px;
  --cr-icon-button-margin-start: 0;
  --cr-icon-button-margin-end: 8px;
  background-color: var(--color-new-tab-page-composebox-background);
  border-radius: 4px;
  color: var(--color-new-tab-page-composebox-pdf-chip-icon);
  height: 100%;
  width: 100%;
}

.pdf-title {
  color: var(--color-new-tab-page-composebox-file-chip-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  margin-inline-end: 16px;
  max-width: 100px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#imgChip:hover .img-overlay,
#imgChip:focus-within .img-overlay,
#pdfChip:hover .pdf-overlay,
#pdfChip:focus-within .pdf-overlay {
  opacity: 1;
}
