h2,
h3,
h3,
p,
span {
  padding: 0;
  margin: 0;
}

div#wpfooter {
  display: none;
}

#Elegant_Plugin__Continer {
  max-width: 85%;
  margin: 1rem auto;

  & .Search {
    background-color: rgb(179 179 179 / 33%);
    border-radius: 12px;
    margin: 3rem auto 5rem;
    height: 48px;
    width: 55%;

    & input {
      width: 100%;
      height: inherit;
      border: none;
      background: transparent;
    }
  }
}

.Elegant_Plugin__Box {
  width: 85%;
  margin: 0 auto;

  & .Plugins__ {
    box-sizing: border-box;
    margin: 0 0 8px 0;
    padding: 0 18px 0 10px;
    display: flex;
    position: relative;
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    align-items: center;
    justify-content: space-between;
    height: 98px;
    gap: 1rem;

    &:hover {
      background-color: #fff;
      border: 1px solid transparent;
      box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
        0 2px 6px 2px rgba(60, 64, 67, 0.15);
    }

    & .thumbnail {
      overflow: hidden;
      border-radius: 5px;
      min-width: 80px;
      height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;

      & img {
        width: 100%;
        height: 100%;
      }
    }

    & .info {
      display: flex;
      gap: 14px;
      width: 100%;
      justify-content: space-between;
      align-items: center;
      height: 100%;

      & .left {
        width: -webkit-fill-available;

        .info__box {
          display: flex;

          & .left {
            display: flex;
            flex-direction: column;
            gap: 6px;

            h3 {
              font-size: 16px;
              color: #0000009e;
            }
          }

          & .right {
            align-content: end;
          }
        }
      }
    }
  }
}
.custom-file-upload {
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: #f6f7f7;
  border: 1px solid #ccd0d4;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 9rem;
}

.custom-file-upload:hover {
  background: #e2e5e9;
}

.custom-file-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
}

.progress-container {
  width: 100%;
  height: 8px;
  background: #e1e4e8;
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: #2271b1;
  transition: width 0.3s ease;
}

.upload-success {
  margin-top: 10px;
  text-align: center;
  animation: fadeIn 0.5s ease forwards;
}

.upload-success .checkmark {
  font-size: 26px;
  display: block;
  animation: pop 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* تحسين الشكل في الشاشات الصغيرة */
@media (max-width: 600px) {
  .upload-plugin-form {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-file-upload,
  .upload-plugin-form .button-primary {
    width: 100%;
    text-align: center;
  }
}

.plugin-filters.Add_New_Plugind {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  gap: 2rem;

  .left {
    width: 100%;
    & * {
      color: #000000;
    }

    & a {
      border-right: 1px solid #00000038;
      padding-right: 7px;
      margin-right: 7px;
      text-decoration: none;
      font-size: 13px;
    }
  }

  .continerControll {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: 100%;
    justify-content: space-between;

    & select#epm-bulk-action {
      border: 1px solid #ccd0d4;
      background: transparent;
    }

    & form {
      margin: 0;
    }
  }
}

/* Modal Update Styles */
.epm-update-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.epm-update-modal.show {
  display: flex;
}

.epm-update-modal-inner {
  background: #fff;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
  border-radius: 6px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.epm-update-close {
  position: absolute;
  right: 15px;
  top: 12px;
  background: none;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
}

.epm-update-close:hover {
  color: #000;
}

.epm-update-modal h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 20px;
  color: #333;
}

.epm-update-content {
  margin-top: 12px;
  color: #555;
  line-height: 1.6;
}

.epm-update-content p {
  margin: 10px 0;
}

.epm-update-content ul,
.epm-update-content ol {
  margin: 10px 0 10px 20px;
}

.epm-update-content li {
  margin: 5px 0;
}

/* Checkbox visibility toggle - show on hover or when checked */
.epm-bulk-checkbox-wrap {
  display: none;
  transition: all 0.3s ease;
}

/* Show checkbox on hover */
.Plugins__:hover .epm-bulk-checkbox-wrap {
  display: block !important;
}

/* Keep checkbox visible when checked */
.epm-bulk-checkbox:checked {
  display: block !important;
}

.epm-bulk-checkbox:checked + .epm-bulk-checkbox-wrap,
.Plugins__:has(.epm-bulk-checkbox:checked) .epm-bulk-checkbox-wrap {
  display: block !important;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet Devices (768px - 1024px) */
@media (max-width: 1024px) {
  #Elegant_Plugin__Continer {
    max-width: 95%;
    margin: 0.8rem auto;

    & .Search {
      width: 75%;
      height: 44px;
      margin: 2rem auto 3rem;

      & input {
        font-size: 16px;
      }
    }
  }

  .Elegant_Plugin__Box {
    width: 95%;

    & .Plugins__ {
      height: 90px;
      padding: 0 12px;
      gap: 0.8rem;

      & .thumbnail {
        min-width: 70px;
        height: 70px;
      }

      & .info {
        gap: 10px;

        & .left {
          .info__box {
            & .left h3 {
              font-size: 14px;
            }

            & .left p {
              font-size: 12px;
            }
          }
        }
      }
    }
  }

  .plugin-filters.Add_New_Plugind {
    .continerControll {
      gap: 1.5rem;
      flex-wrap: wrap;

      & select#epm-bulk-action,
      & .button-primary {
        font-size: 14px;
        padding: 8px 12px;
      }
    }
  }

  .custom-file-upload {
    width: 8rem;
    font-size: 13px;
    padding: 5px 10px;
  }

  .epm-update-modal-inner {
    width: 95%;
    max-height: 85vh;
    padding: 15px;
  }

  .epm-update-modal h2 {
    font-size: 18px;
  }
}

/* Small Tablet (600px - 767px) */
@media (max-width: 767px) {
  #Elegant_Plugin__Continer {
    max-width: 100%;
    margin: 0.5rem;

    & .Search {
      width: 90%;
      height: 40px;
      margin: 1.5rem auto 2.5rem;
      border-radius: 8px;

      & input {
        font-size: 15px;
        padding: 0 12px;
      }
    }
  }

  .Elegant_Plugin__Box {
    width: 100%;
    padding: 0 0.5rem;

    & .Plugins__ {
      height: 85px;
      padding: 0 8px;
      gap: 0.5rem;
      flex-wrap: wrap;

      & .thumbnail {
        min-width: 60px;
        height: 60px;
      }

      & .info {
        width: 100%;
        gap: 8px;
        flex-wrap: wrap;

        & .left {
          width: 100%;

          .info__box {
            flex-wrap: wrap;
            gap: 8px;

            & .left {
              gap: 4px;

              h3 {
                font-size: 13px;
              }

              p {
                font-size: 11px;
              }
            }

            & .right {
              width: 100%;
              display: flex;
              gap: 0.5rem;
              flex-wrap: wrap;

              & form {
                flex: 1;
                min-width: 70px;
              }

              & button,
              & input {
                font-size: 12px;
                padding: 6px 8px;
              }
            }
          }
        }
      }
    }
  }

  .plugin-filters.Add_New_Plugind {
    gap: 1rem;

    .left {
      & a {
        font-size: 12px;
        padding-right: 5px;
        margin-right: 5px;
      }
    }

    .continerControll {
      flex-direction: column;
      gap: 1rem;
      width: 100%;

      & select#epm-bulk-action,
      & .button-primary {
        width: 100%;
        font-size: 13px;
        padding: 10px;
      }

      & form {
        width: 100%;

        & .button-primary {
          width: 100%;
        }
      }
    }
  }

  .custom-file-upload {
    width: 100%;
    font-size: 13px;
    padding: 10px;
  }

  .upload-plugin-form {
    flex-direction: column;
    gap: 0.5rem;

    & .button-primary {
      width: 100%;
    }
  }

  .epm-update-modal-inner {
    width: 98%;
    max-height: 90vh;
    padding: 12px;
  }

  .epm-update-modal h2 {
    font-size: 16px;
  }

  .epm-update-close {
    right: 10px;
    top: 8px;
    font-size: 24px;
  }
}

/* Mobile Devices (320px - 599px) */
@media (max-width: 599px) {
  body {
    font-size: 14px;
  }

  #wpbody-content {
    padding: 0;
  }

  input[type="checkbox"],
  input[type="radio"] {
    height: 16px !important;
    width: 16px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  #Elegant_Plugin__Continer {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem;

    & .Search {
      width: 100%;
      height: 38px;
      margin: 1rem auto 1.5rem;
      border-radius: 6px;

      & input {
        font-size: 14px;
        padding: 0 10px;
      }
    }

    & .plugin-filters.Add_New_Plugind {
      flex-direction: column !important;

      & .left .right {
        flex-wrap: wrap;
        align-items: center;
      }

      & .upload-plugin-section form {
        flex-direction: row;
        flex-wrap: wrap;
      }
    }
  }

  .Elegant_Plugin__Box {
    width: 100%;
    padding: 0;

    & .Plugins__ {
      height: auto;
      padding: 8px;
      gap: 0.5rem;
      flex-direction: column;
      align-items: flex-start;

      &:hover {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
      }

      & .thumbnail {
        min-width: 50px;
        height: 50px;
      }

      & .info {
        width: 100%;
        gap: 6px;
        flex-direction: column;

        & .left {
          width: 100%;

          .info__box {
            flex-direction: column;
            gap: 6px;

            & .left {
              gap: 3px;

              h3 {
                font-size: 12px;
                font-weight: 600;
              }

              p {
                font-size: 10px;
                color: #666;
              }
            }

            & .right {
              width: 100%;
              display: flex;
              gap: 0.5rem;
              flex-wrap: wrap;

              & form {
                flex: 1;
                min-width: 50px;
              }

              & button,
              & input[type="submit"] {
                font-size: 11px;
                padding: 5px 6px;
                border: 1px solid #ccd0d4;
                border-radius: 3px;
                background: #f6f7f7;
                cursor: pointer;
              }

              & button:active {
                background: #e2e5e9;
              }
            }
          }
        }
      }
    }
  }

  .plugin-filters.Add_New_Plugind {
    gap: 0.8rem;
    padding: 0 0.5rem;

    .left {
      width: 100%;
      text-align: center;

      & a {
        display: inline-block;
        font-size: 11px;
        padding: 5px 8px;
        margin: 0 3px 5px 0;
        border: 1px solid #00000038;
        border-radius: 3px;
        background: #f6f7f7;
      }
    }

    .continerControll {
      flex-direction: column;
      gap: 0.8rem;
      width: 100%;
      align-items: stretch;

      & select#epm-bulk-action {
        width: 100%;
        font-size: 12px;
        padding: 10px;
        border: 1px solid #ccd0d4;
        border-radius: 4px;
      }

      & .button-primary {
        width: 100%;
        font-size: 12px;
        padding: 12px;
        background: #2271b1;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
      }

      & form {
        width: 100%;
      }
    }
  }

  .custom-file-upload {
    width: 100%;
    font-size: 12px;
    padding: 12px;
    text-align: center;
    display: block;
  }

  .upload-plugin-form {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;

    & .button-primary {
      width: 100%;
      padding: 12px;
      font-size: 12px;
    }
  }

  .progress-container {
    height: 6px;
    margin-top: 8px;
  }

  .progress-bar {
    transition: width 0.2s ease;
  }

  .upload-success .checkmark {
    font-size: 20px;
  }

  /* Modal Styles for Mobile */
  .epm-update-modal {
    padding: 10px;
  }

  .epm-update-modal-inner {
    width: 100%;
    max-height: 95vh;
    padding: 10px;
    border-radius: 4px;
  }

  .epm-update-modal h2 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .epm-update-modal-inner p {
    font-size: 13px;
    line-height: 1.5;
  }

  .epm-update-close {
    right: 8px;
    top: 6px;
    font-size: 20px;
  }

  /* Checkbox visibility on mobile - always visible */
  .epm-bulk-checkbox-wrap {
    display: block !important;
  }

  .Plugins__:hover .epm-bulk-checkbox-wrap {
    display: block !important;
  }

  /* Checkboxes always visible on mobile */
  .epm-bulk-checkbox {
    display: block !important;
    width: 18px;
    height: 18px;
    cursor: pointer;
  }
}

/* Extra Small Mobile (320px - 379px) */
@media (max-width: 379px) {
  h2,
  h3 {
    font-size: 12px;
  }

  #Elegant_Plugin__Continer .Search {
    height: 36px;
    margin: 0.8rem auto 1.2rem;
  }

  .Elegant_Plugin__Box .Plugins__ {
    padding: 6px;

    & .thumbnail {
      min-width: 45px;
      height: 45px;
    }

    & .info .left .info__box .left h3 {
      font-size: 11px;
    }

    & .info .left .info__box .left p {
      font-size: 9px;
    }

    & .info .left .info__box .right button,
    & .info .left .info__box .right input[type="submit"] {
      font-size: 10px;
      padding: 4px 5px;
    }
  }

  .plugin-filters.Add_New_Plugind {
    padding: 0.3rem;

    .left a {
      font-size: 10px;
      padding: 4px 6px;
      margin: 0 2px 5px 0;
    }

    .continerControll {
      gap: 0.5rem;

      & select#epm-bulk-action,
      & .button-primary {
        font-size: 11px;
        padding: 8px;
      }
    }
  }

  .custom-file-upload {
    font-size: 11px;
    padding: 8px;
  }

  .epm-update-modal-inner {
    padding: 8px;
  }

  .epm-update-modal h2 {
    font-size: 12px;
    margin-bottom: 8px;
  }
}
