/* Media Library Container */
.media-library {
  width: 80%;
  /* background-color: #f9fafb; */
  padding-left: 35px;
  padding-top: 3px;
  box-sizing: border-box;
}

/* Main Heading */
.main-heading {
  font-family: "Aileron-Heavy";
  font-size: clamp(1.5rem, 6vw, 2.4rem);
  margin-bottom: 2rem;
  color: #000000;
}

/* Blue Section */
.blue-section {
  background-color: #22a0dc;
  padding: 1rem 1.9rem;
  margin-bottom: 1.5rem;
}

.blue-content {
  display: flex;
  align-items: center;
  gap: 10rem;
  flex-wrap: nowrap;
}

/* Search Container */
.search-container {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0; /* allow flex children to shrink */
}

.search-label {
  color: #ffffff;
  font-family: "Acumin Pro Bold";
  font-size: clamp(1.1rem, 2vw, 1.2rem);
  padding-top: 3px;
  /* 21pt */
}

/* ------------------ Search wrapper & input (ICON LEFT) ------------------ */

/* Search wrapper: relative so icon can be positioned (LEFT inside input) */
.search-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
}

/* INPUT: text color black, placeholder grey, extra left padding for icon */
.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.5rem 2.8rem; /* left padding reserves icon space */
  border-radius: 9999px;
  border: none;
  outline: none;
  color: #000000; /* input text black */
  background-color: #ffffff; /* ensure visible contrast inside blue bar */
  font-family: "Acumin Pro Regular";
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  box-sizing: border-box;
}

/* Placeholder color (lighter grey) */
.search-input::placeholder {
  color: #9ca3af;
  opacity: 1;
}

/* Focus outline effect */
.search-input:focus {
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.5);
}

/* Search icon positioned inside input on the LEFT */
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  height: 1.45rem;
  pointer-events: none; /* clicks pass to input */
  transition: opacity 0.12s ease, transform 0.12s ease;
  opacity: 1;
  visibility: visible;
}

/* Hide icon when input is focused OR when input has text.
   Works best if placeholder is non-empty (e.g. placeholder="Search media...") */
.search-wrapper input:focus + .search-icon,
.search-wrapper input:not(:placeholder-shown) + .search-icon {
  opacity: 0;
  transform: translateY(-50%) scale(0.95);
  visibility: hidden;
}

/* ------------------ Filter Container ------------------ */

.filter-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0; /* allow wrapping/shrinking */
}

.filter-label {
  color: #ffffff;
  font-family: "Acumin Pro Bold";
  font-size: clamp(1.16rem, 2vw, 1.26rem);
  padding-top: 2px;
}

.filter-buttons {
  display: flex;
  align-items: center;
  /* gap: 0.5rem; */
  flex-wrap: nowrap;
  overflow: visible;
}

.filter-item {
  color: #ffffff;
  font-size: clamp(1.19rem, 2vw, 1.2rem);
  white-space: nowrap;
}

.filter-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: clamp(1.1rem, 2vw, 1.12rem);
  cursor: pointer;
  font-family: "Acumin Pro Regular";
  padding: 0rem 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  text-decoration: underline;
}

.filter-separator {
  margin: 0 0.5rem;
  color: #ffffff;
  font-size: clamp(0.8rem, 2vw, 1.12rem);
  font-family: "Acumin Pro Regular";
}

.filter-separator-para-content {
  font-size: clamp(0.8rem, 2vw, 1.12rem);
  margin: 0 0.5rem;
  font-family: "Acumin Pro Regular";
  color: black;
}

/* ---------- Dimensions Section ---------- */
.dimensions-section {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  margin-bottom: 1.5rem;
  padding-top: 40px;
  padding-left: 38px;
  box-sizing: border-box;
}

.dimensions-btn {
  background-color: #e93248;
  color: #ffffff;
  padding: 0rem 1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: "Acumin Pro Bold";
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background-color 0.2s;
  font-size: clamp(0.9rem, 2.5vw, 0.9rem);
}

.dimensions-btn:hover {
  background-color: #ef4444;
}

.arrow-icon {
  height: 1.35rem;
}

.info-box {
  flex: 1;
  background-color: white;
}

.info-text {
  color: #231f20;
  font-family: 'Acumin Pro Medium';
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  margin: 0;
}

/* Bottom Section */
.bottom-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 45px;
  padding-left: 38px;
  box-sizing: border-box;
}

.add-media-btn {
  background-color: #22a0dc;
  color: #ffffff;
  padding: 0rem 1.5rem;
  padding-top: 0.8rem;
  padding-bottom: 0.5rem;
  border-radius: 0.5rem;
  font-family: 'Acumin Pro Bold';
  border: none;
  cursor: pointer;
  font-size: clamp(1rem, 2.5vw, 1rem);
  transition: background-color 0.2s;
}

.add-media-btn:hover {
  background-color: #2563eb;
}

.file-info {
  font-family: 'Acumin Pro Medium';
  color: #231f20;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  margin: 0;
}

/* ------------------ Responsive Design ------------------ */

/* Large screens */
@media (max-width: 1469px) {
  .media-library {
    width: 95%;
  }
}

@media (max-width: 1268px) {
  .blue-content {
    gap: 3rem;
  }
}

/* Mid-large */
@media (max-width: 1152px) {
  .media-library {
    width: 100%;
  }
  .blue-content {
    gap: 1rem;
  }
}

/* ---------- <= 1072px: wrap blue-content, make search flexible ---------- */
@media (max-width: 1072px) {
  .media-library {
    width: 100%;
    padding-left: 20px; /* reduce left padding on smaller screens */
  }

  /* allow items in blue-content to wrap and align to top */
  .blue-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
  }

  /* Make search take full width of its column and be more flexible */
  .search-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
  }

  /* wrapper stretches full width so absolute icon positioning is reliable */
  .search-wrapper {
    position: relative;
    width: 100%;
    max-width: 520px;
  }

  /* input uses full width and keeps space for the icon on the left */
  .search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.6rem;
    box-sizing: border-box;
  }

  .search-icon {
    left: 0.75rem;
  }

  /* Filters should occupy full width beneath or next to search depending on space */
  .filter-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
  }

  .filter-buttons {
    display: flex;
    flex-wrap: wrap;
    /* gap: 0.5rem; */
    align-items: center;
  }

  .filter-item {
    white-space: nowrap; /* keep each filter label intact */
  }

  /* Dimensions and info block stack vertically and use full width */
  .dimensions-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding-top: 24px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .dimensions-btn {
    width: 100%;
    justify-content: center;
  }

  .info-box {
    width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
  }

  /* Bottom section stacks and left padding reduced */
  .bottom-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 28px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .add-media-btn {
    width: auto; /* keep button natural width, but if needed it can be full width */
    min-width: 160px;
  }

  .file-info {
    margin-top: 6px;
  }
}

/* Specific tweaks (these reduce unnecessary extreme padding that existed before) */
@media (max-width: 1023px){ .media-library { padding-left: 100px; } }

 @media (max-width: 992px){
   .media-library { 
    padding-top: 15px; padding-left: 20px; } }

/* Tablet to medium screens */
@media (min-width: 769px) and (max-width: 1268px) {
  .blue-content {
    gap: 1.2rem;
  }

  .search-wrapper {
    max-width: 420px;
  }
}

/* ---------- Mobile: stack content ---------- */
@media (max-width: 768px) {
  .blue-content {
    flex-direction: column;
    gap: 1rem;
  }
  /*  ................................................................................................ */
      .dimensions-section {
      
        padding-top: 20px;
        padding-left: 0px;
        padding-right: 0px;
    }
        .info-box {
       
        padding: 0rem;
       
        }
            .bottom-section {
       
        padding-top: 11px;
        padding-left: 0px;
        padding-right: 0px;
            }
            .main-heading {
  
    font-size: clamp(1.5rem, 6vw, 2.4rem);
    margin-bottom: 1rem;
            }
            /*........................................................................................  */

  .dimensions-section {
    flex-direction: column;
  }

  .bottom-section {
    flex-direction: column;
    align-items: flex-start;
  }
}
 @media (max-width: 589px){
    .media-library {
       
        padding-left: 0px;
    }
    .blue-section {
  
    padding: 1rem 0.5rem;

    }
    .filter-btn {
    
    padding: 0 0rem;
    }
 }

@media(max-width: 378px){
  .filter-btn {
  
  font-size: clamp(0.845rem, 2vw, 1.12rem);
  }
}