/* utilities */
.pb-3 {
  padding-bottom: 1rem;
}
.pb-4 {
  padding-bottom: 1.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.mt-4 {
  margin-top: 1.5rem;
}

.media-library-container {
  /* background-color: yellow; */
}
.action-wrapper {
  display: flex;
  align-items: center;
  background-color: white;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  gap: 1rem;
}
.search-container {
  width: 260px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.search-container p {
  margin: 0;
  font-weight: 600;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.media-grid-item {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1;
  cursor: pointer;
}
.media-grid-item.selected {
  border: 4px solid #007bff;
}

.media-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* modal */
dialog {
  background-color: white;
  border-radius: 6px;
  padding: 1rem;
  position: relative;
  width: 90%;
  height: 90%;
  border: 0;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  animation: fade-out 0.3s ease-out;
}
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
}
dialog[open] {
  animation: fade-in 0.3s ease-out;
}
dialog[open]::backdrop {
  animation: backdrop-fade-in 0.3s ease-out forwards;
}
dialog .dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-bottom: 1rem;
}
dialog .dialog-header h3 {
  font-weight: 600;
  margin: 0;
}
dialog .dialog-header .close {
  color: black;
  font-size: 32px;
  opacity: 1;
}
dialog .dialog-content {
  display: flex;
  height: calc(100% - 48px);
}
dialog .dialog-content .image-wrapper {
  padding: 1rem;
  width: 70%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 1px solid #ccc;
}
dialog .dialog-content .image-wrapper img {
  max-width: 100%;
  max-height: 100%;
}
dialog .dialog-content .image-info {
  width: 30%;
  padding: 1rem;
}
dialog .dialog-content .button-wrapper {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    display: none;
  }

  100% {
    opacity: 1;
    display: block;
  }
}
@keyframes fade-out {
  0% {
    opacity: 1;
    display: block;
  }

  100% {
    opacity: 0;
    display: none;
  }
}
@keyframes backdrop-fade-in {
  0% {
    background-color: rgb(0 0 0 / 0%);
  }

  100% {
    background-color: rgb(0 0 0 / 25%);
  }
}

.drop-area {
  border: 2px dashed #ccc;
  border-radius: 6px;
  width: 100%;
  height: 150px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}
.drop-area p {
  margin: 0;
  font-size: 20px;
}

.drop-area:hover {
  background-color: #f9f9f9;
}

.tabs {
  display: block;
  flex: 1;
}
.tab-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.tab {
  border: 1px solid #ccc;
  border-bottom: none;
  border-top: none;
  cursor: pointer;
  padding: 8px 20px;
  cursor: pointer;
}
.tab.active {
  background-color: #007bff;
  color: white;
}
#addNewMediaModal .tab-content {
  display: none;
}
#addNewMediaModal .tab-content.active-content {
  display: block;
}

.flex-library {
  display: flex;
  flex-wrap: nowrap;
  height: 100%;
}
.flex-library .col-70 {
  width: 70%;
  padding: 1rem;
  border-right: 1px solid #ccc;
  /* border: 1px solid red; */
}

.flex-library .col-30 {
  width: 30%;
  padding: 1rem;
  /* border: 1px solid red; */
}
