@media only screen and (max-width: 1200px) {
    /* Styles for tablet and smaller devices */
    /* Set the container width to be 100% of the viewport width */
    #postpixadmin .wrap {
        width: 100vw;
        padding: 1em; /* Add some padding */
    }
    
    /* Make logo responsive */
    #postpixadmin .logo {
        width: 50vw; /* Set the logo width to 50% of the viewport width */
        height: auto; /* Adjust height automatically */
    }

    .aipstx-form-table {
    max-width: 85%; /* Ekranın %90'ı kadar genişlik */
  }
}

@media only screen and (max-width: 1100px) {

    .aipstx-form-table {
    max-width: 80%; 
  }
}

@media only screen and (max-width: 900px) {

    .aipstx-form-table {
    max-width: 70%; 
  }
}

@media only screen and (max-width: 768px) {
    .aipstx-form-table th,
    .aipstx-form-table td {
        display: block; /* her th ve td'yi yeni bir blok olarak ayarlar */
        width: 100%; /* tam genişlik */
        box-sizing: border-box; /* padding ve border genişliği genişliğe dahil eder */
    }

    .aipstx-form-table th {
        padding-bottom: 0.5em; /* başlık ve içerik arasında boşluk bırakır */
    }
  }

@media only screen and (max-width: 480px) {
    /* Styles for mobile devices */

    #postpixadmin .wrap {
        max-width: 400px;
    }

#postpixadmin .postpix-settings-form input[type="text"] {
  width: 100%!important; /* Tam genişlik kullan */
}

   .aipstx-form-table {
  align-items: center;
   }


    .input-button-group {
    display: flex;
    flex-direction: column;
    align-items: center; /* Merkezde hizala */
    width: 100%; /* Grubun genişliğini %100 yap */
  }

  .input-button-group button {
    width: 100%; /* Genişliği %100 yap */
    margin-bottom: 0.5em; /* Elementler arası boşluk */
  }

  .input-button-group button {
    max-width: 250px; /* Butonların maksimum genişliği sınırla */
  }

  .input-button-group input[type="text"] {
  width: 100%; /* Tam genişlik kullan */
  margin-bottom: 0.5em; /* Buton ile arada boşluk oluştur */
}

  .aipstx-form-table {
    max-width: 100%; /* Tablonun maksimum genişliğini %100 yap */
  }


    #postpixadmin .wrap {
        padding: 0.5em;
    }
    
    /* Adjust logo size for mobile devices */
    #postpixadmin .logo {
        width: 75vw; 
    }

    .aipstx-form-table {
       max-width: 40%;
      justify-content: center; 
  }

}
/* ADMIN PANEL CSS */

/* Ana stil ayarları */
#postpixadmin .wrap {
  font-family: 'Poppins', sans-serif;
  color: #333;
  font-size:15px;
}

#postpixadmin .wrap a {
  text-decoration: none;
}


#postpixadmin .logo {
  background-image: url("../../img/postpixlogo.png");
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0.0em;
  width: 10em;
  height: 2em;
}

/* Başlık Stilleri */
#postpixadmin .wrap h1 {
  color: #6a40b6;
  margin-top: 0.625em;
  font-size: 1.5625em;
  font-weight: 500;
  padding-top: 1.25em;
}

/* Form Stilleri */

.aipstx-form-table {
    box-shadow: 0 0.125em 0.25em rgba(0, 0, 0, 0.1);
    display: flex;
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    width: 100%;
}

#postpixadmin .postpix-settings-form {
  position: relative; 
  padding: 1.25em;
  border-radius: 0.4375em;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Input Stilleri */
#postpixadmin .postpix-settings-form input[type="text"] {
  border-radius: 0.4375em;
  padding: 0.625em;
  width: 30em;
  box-sizing: border-box;
  border: 0.2em solid #6d13e2;
  background-color: #f7efff;
  color: #951ced;
  font-weight: 500;
  margin-bottom: 10px;
}

#postpixadmin .postpix-settings-form input[type="submit"] {
  border-radius: 0.4375em;
  padding: 1em;
  width: 15.625em;
  box-sizing: border-box;
  font-weight: 600;
}

/* Buton Stilleri */
#postpixadmin .wrap .button {
  transition: all 0.5s ease, opacity 0.5s ease;
  opacity: 1;
  background: linear-gradient(135deg, #6d13e2 0%, #3d1368 100%);
  color: white;
  box-shadow: none;
  text-shadow: none;
}

#postpixadmin .wrap .button:hover {
  opacity: 0.9;
}

#postpixadmin .aipstx-form-table input[type="radio"] {
  margin: 0 0.625em 0 0;
  background-color: #f7efff;
}

#postpixadmin #error-notification {
  background-color: #dc3232;
  color: white;
  padding: 0.625em;
  border-radius: 0.4375em;
  margin-top: 0.625em;
}

#postpixadmin #test-api-section {
  padding-top: 1.25em;
}

#postpixadmin #test_api_button,
#postpixadmin #aipstx_test_openai_button {
  transition: all 0.5s ease;
  opacity: 1;
  background: linear-gradient(135deg, #6d13e2 0%, #3d1368 100%);
  color: white;
  border: none;
  padding: 0.8em 0.9375em;
  border-radius: 0.4375em;
  position: relative;
  margin-left: 0.5em;
  margin-bottom: 1em;
  font-weight: 600;
}


#postpixadmin #test_api_button:hover,
#postpixadmin #aipstx_test_openai_button:hover {
  transition: all 0.5s ease;
  opacity: 0.9;
}

#postpixadmin .aipstx-form-table th {
  color: #6a40b6;
  padding: 1.25em 0.625em;
}

#postpixadmin .aipstx-form-table td {
  padding: 0.9375em 0.625em;
  font-weight: 500;
}

#postpixadmin #loading-gif {
  text-align: center;
  padding: 1.25em;
}

#postpixadmin #loading-gif img {
  max-width: 6.25em;
  height: auto;
}

#aipstx_edenai_key,
#aipstx_openai_key {
  display: inline-block;
  width: calc(100% - 16.875em);
}

.fpromptlink {
  color: #6d13e2;
  font-weight: 600;
  margin-left: 0.3125em;
  transition: all 0.5s ease;
}

.fpromptlink:hover {
  color: #c78aff;
  font-weight: 600;
  margin-left: 0.625em;
}

.admin-left {
  display: flex;
  flex-direction: column;
  min-width: 56.25em;
}

#postpix-settings-form {
  position: relative;
}

/* Popup Window Styles */
.aipstx-instructions {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Popup içeriği için stil */
.aipstx-instructions .popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: auto;
    max-width: 70vh; /* Maksimum genişlik */
    max-height: 80vh; /* Maksimum yükseklik viewport'un %80'i olarak ayarlandı */
    overflow-y: auto; /* Fazla içerik olduğunda dikey scroll */
}

/* Kapat butonu stil ayarları */
.aipstx-instructions .close-button {
    float: right;
    width: 32px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    border-radius: 50%;
    background: #6d13e2;
    color: white;
    font-size: 28px;
    cursor: pointer;
    margin-bottom: -32px; /* İçeriğin dışına taşmaması için */
    z-index: 10;
}

.aipstx-instructions .close-button:hover {
    background: #3d1368;
}

.popup-content h3 {
  font-size: 1.5em;
  font-weight: 700;
  color: #7a39f6;
  text-shadow: 0 0 0.0625em #6d13e2;
  text-align: center;
}

.popup-content ul {
  counter-reset: index;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25em;
  max-width: 60.75em;
  margin-left: 1.25em;
  justify-content: center;
}

.popup-content li {
  counter-increment: index;
  padding: 0.75em 0.75em 1.25em 0.75em;
  box-sizing: border-box;
  background: #f9f4ff;
  border-radius: 0.4375em;
  box-shadow: 0 0 0.1875em #6d13e2;
  border: none;
  color: #7c3fff;
  font-size: 0.875em;
  flex: 0 0 calc(50% - 0.625em);
  max-width: 15.625em;
  font-weight: 500;
}

.popup-content li::before {
  content: counters(index, ".", decimal-leading-zero);
  font-size: 2em;
  text-align: right;
  font-weight: bold;
  min-width: 3.125em;
  padding-right: 0.75em;
  font-variant-numeric: tabular-nums;
  align-self: flex-start;
  background-image: linear-gradient(to bottom, #7a39f6, #7337f7);
  background-attachment: fixed;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.popup-content li span {
  color: #6d00ff;
  flex-basis: 100%;
  font-weight: 600;
}

.popup-content .spacer {
  display: block;
  margin-top: 0.3125em;
}

.popup-content .spacer span {
    font-size: 0.875em;
}

.popup-content::-webkit-scrollbar {
  width: 0.625em;
}

.popup-content::-webkit-scrollbar-track {
  background: #f8f8f8;
  border-radius: 0.625em;
}

.popup-content::-webkit-scrollbar-thumb {
  background: #7337f7;
  border-radius: 0.3125em;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: #5c2edc;
}

.popup-content {
  scrollbar-width: thin;
  scrollbar-color: #7337f7 #f8f8f8;
}


#scrollButton {
  position: sticky;
  bottom: 0.625em;
  padding: 0.625em 1.25em;
  font-size: 1.0em;
  color: white;
  background-color: #7337f7;
  border: none;
  border-radius: 0.3125em;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
  left: 50%;
  transform: translateX(-50%);
}

.howtobutton {
  position: absolute;
  padding: 0.625em 1.25em;
  font-size: 1.0em;
  color: #fff!important;
  background-color: #7337f7;
  border: none;
  border-radius: 0.3125em;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.howtobutton a:hover {
  color: #fff!important;
  text-decoration: none;
  margin-left: 0px!important;	
}

.prompt-title {
  color: #6a40b6;
  font-weight: 600;
  padding-bottom:1em!important;
  border-bottom: 1px solid #D6DADE;
}

/* Anahtar düğme (Switch Button) stilleri */
.switch {
  position: relative;
  display: inline-block;
  width: 50px; /* Daha küçük genişlik */
  height: 24px; /* Daha küçük yükseklik */
  margin-right: 10px;
  margin-bottom: 10px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px; /* Yüksekliğe göre yuvarlaklık */
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px; /* Daha küçük yükseklik */
  width: 20px; /* Daha küçük genişlik */
  left: 2px; /* Yeterli yer bırak */
  bottom: 2px; /* Yeterli yer bırak */
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #6d13e2;
}

input:focus + .slider {
  box-shadow: 0 0 1px #6d13e2;
}

input:checked + .slider:before {
  transform: translateX(26px); /* Slider'ı sağa kaydır */
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* .aipstx-form-table içindeki prompt-title için stil eklemesi */
.prompt-title {
  display: block;
  font-weight: 600!important;
  margin-bottom: 10px; /* Alt başlık ile radyo düğmeleri arasında boşluk */
}

.option-text {
  font-weight: 600;
}

/* HEAD MENU */

.postpix-nav {
  display: flex;
  position: relative;
  background: linear-gradient(135deg, #3d1368 0%, #6d13e2 100%);
  border-radius: 10px;
  white-space: nowrap;
  color: #ffffff;
  margin: 20px 20px 0px 20px;
}
.postpix-nav-logo {
  display: flex;
  align-items: center;
  padding: 10px;
}
.postpix-nav-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.plugin-version {
  display: block;
  font-weight: 500;
  font-size: 14px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.postpix-nav-list {
  display: flex;
  align-items: center;
  padding: 0 30px;
}

.postpix-nav-list i {
  margin-right: 5px;
}

.postpix-nav-list-item {
  font-weight: 500;
  font-size: 14px;
  line-height: 30px;
  position: relative;
}
.postpix-nav-list-item a {
  display: flex;
  align-items: center;
  padding: 19px;
  position: relative;
  color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  outline: none;
  z-index: 1;
}
.postpix-nav-list-item a span {
  margin-right: 7px;
  font-size: 20px;
}
.postpix-nav-list-item:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-bottom: 3px solid #e4e4e4;
  background-color: rgba(255, 255, 255, 0.1);
  visibility: hidden;
  opacity: 0;
  z-index: 0;
}
.postpix-nav-list-item:active a, body .postpix-nav-list-item:focus a, body .postpix-nav-list-item.active a {
  color: #ffffff;
}
.postpix-nav-list-item:active:after, body .postpix-nav-list-item:focus:after, body .postpix-nav-list-item.active:after {
  visibility: visible;
  opacity: 1;
}
.postpix-nav-list-item.upcoming:after {
  display: none;
}
.postpix-nav-list-item.upcoming a {
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
}
.postpix-nav-additions {
  display: flex;
  align-items: center;
  margin: 0 0 0 auto;
}
.postpix-nav-additions a {
  color: #ffffff;
}

.postpix-nav-additions i {
  margin-right: 10px;
}

.postpix-nav-additions .notifications-status {
  display: flex;
  align-items: center;
  padding: 19px;
  max-width: 70px;
  line-height: 15px;
  font-size: 12px;
  box-shadow: none;
  white-space: normal;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.postpix-nav-additions .notifications-status span {
  margin-right: 7px;
  position: relative;
  font-size: 18px;
}
.postpix-nav-additions .additions-menu {
  display: flex;
  width: 60px;
  justify-content: center;
  align-items: center;
  padding: 19px 0;
  font-size: 14px;
  box-shadow: none;
  position: relative;
}
.postpix-nav-additions .additions-menu span:nth-child(2) {
  display: none;
}

.postpix-nav-additions:hover .support-menu,
.postpix-nav-additions .additions-menu:focus + .support-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: visibility 0s, opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  margin-top: -10px;
  font-size: 14px;
}

.postpix-nav-additions .ai-status,
.postpix-nav-additions .support-menu {
  position: absolute;
  top: 100%;
  right: 0;
  -webkit-transform: translateY(-10px);
          transform: translateY(-10px);
  min-width: 170px;;
  border-radius: 0px 0px 10px 10px;
  background-color: #6b13dd;
  visibility: hidden;
  opacity: 1;
  z-index: 100;
}
.postpix-nav-additions .ai-status ul,
.postpix-nav-additions .support-menu ul {
  margin: 0;
  padding: 0;
}
.postpix-nav-additions .ai-status ul li,
.postpix-nav-additions .support-menu ul li {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.postpix-nav-additions .ai-status ul li:first-child,
.postpix-nav-additions .support-menu ul li:first-child {
  border: 0;
}
.postpix-nav-additions .ai-status ul li span,
.postpix-nav-additions .support-menu ul li span {
  margin-right: 10px;
  font-size: 18px;
}
.postpix-nav-additions .ai-status ul li a,
.postpix-nav-additions .support-menu ul li a {
  display: flex;
  align-items: center;
  box-shadow: none;
}


.postpix-nav-additions .ai-status > div {
  display: none;
}
.postpix-nav-additions .ai-status:before {
  right: 80px;
  background-color: #ffffff;
}
.postpix-nav-additions.support-menu-active .additions-menu span {
  display: block;
  font-size: 14px;
}
.postpix-nav-additions.support-menu-active .additions-menu span:first-child {
  display: none;
}
.postpix-nav-additions.support-menu-active .support-menu {
  opacity: 1;
  -webkit-transform: translateY(0);
          transform: translateY(0);
  transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transition: opacity 0.2s ease, transform 0.2s ease, -webkit-transform 0.2s ease;
  visibility: visible;
  z-index: 100;
}

.postpix-save-alert {
   margin: 0px 20px;
}