/* =====================================================
   Full Revised CSS for WebP to JPG/PNG Converter Plugin
   Version: 1.11
   ===================================================== */

/* Overall container */
.wtj-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

/* Headings and instructions */
.wtj-heading,
.wtj-instructions {
  margin-bottom: 20px;
}

/* Column header styling: grey background, small font, centered using flexbox */
.wtj-column-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0; /* light grey background */
  height: 50px;
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
}

/* Upload button styling, always shows "Upload" and is centered */
.wtj-upload-button {
  display: block;
  width: 150px;
  margin: 0 auto 20px auto;
  padding: 12px 24px;
  background-color: #0073aa;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.wtj-upload-button:hover {
  background-color: #005f8d;
}

/* Progress bars styling (for upload & conversion) */
progress {
  width: 100%;
  max-width: 400px;
  height: 20px;
  -webkit-appearance: none;
  appearance: none;
  margin: 10px auto;
  display: block;
}
progress::-webkit-progress-bar {
  background-color: #eee;
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: linear-gradient(to right, #0073aa, #005f8d);
  border-radius: 10px;
}

/* Cancel button styling (modern round "✖" icon) */
#wtj-cancel-btn {
  display: inline-block;
  background-color: #d9534f;
  color: #fff;
  font-size: 18px;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 10px auto;
}
#wtj-cancel-btn:hover {
  background-color: #c9302c;
}

/* =====================================================
   Toggle Container for JPG/PNG Options
   ===================================================== */
.wtj-toggle-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
}

/* Hide the radio inputs but keep them in the DOM so CSS selectors can detect their states */
.wtj-toggle-container input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Style for toggle labels */
.wtj-toggle-container label.wtj-toggle-button {
  display: inline-block;
  padding: 10px 20px;
  background: #f1f1f1;
  border: 2px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 5px;
  transition: all 0.3s ease;
}
.wtj-toggle-container label.wtj-toggle-button:hover {
  background: #e1e1e1;
}

/* Active state styling using explicit attribute selectors.
   This applies even if there are extra tags (like <br/>) between the input and its label. */
#wtj_jpg:checked ~ label[for="wtj_jpg"] {
  background-color: #0073aa !important;
  border-color: #0073aa !important;
  color: #fff !important;
}
#wtj_png:checked ~ label[for="wtj_png"] {
  background-color: #0073aa !important;
  border-color: #0073aa !important;
  color: #fff !important;
}

/* =====================================================
   Convert Button styling
   ===================================================== */
#wtj-convert-btn {
  display: block;
  width: 200px;
  margin: 20px auto;
  padding: 12px 0;
  background-color: #0073aa;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
#wtj-convert-btn:hover {
  background-color: #005f8d;
}

/* Download All as ZIP button styling */
#wtj-download-zip-btn {
  display: block;
  width: 220px;
  margin: 20px auto;
  padding: 12px 0;
  background-color: #28a745;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
#wtj-download-zip-btn:hover {
  background-color: #218838;
}

/* =====================================================
   Quality slider container styling
   ===================================================== */
.wtj-slider-container {
  margin: 20px auto;
  width: 80%;
  max-width: 300px;
}
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
  transition: background 0.3s;
  margin: 10px auto;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0073aa;
  cursor: pointer;
  transition: background 0.3s;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0073aa;
  cursor: pointer;
  transition: background 0.3s;
}

/* =====================================================
   Columns Layout using Flexbox
   ===================================================== */
#wtj-columns {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin-top: 30px;
}
#wtj-uploaded-files,
#wtj-converted-files {
  flex: 1;
  padding: 10px;
  margin: 0 10px;
  border: 1px solid #ddd;
  min-height: 100px;
  box-sizing: border-box;
  overflow: auto;
  text-align: left;
}

/* =====================================================
   File Items Styling
   ===================================================== */
.wtj-uploaded-file-item,
.wtj-converted-file-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 10px;
}
.wtj-download-link {
  margin-left: 10px;
  color: #0073aa;
  text-decoration: none;
}
.wtj-download-link:hover {
  text-decoration: underline;
}
.wtj-delete-btn {
  margin-left: 10px;
  background-color: #d9534f;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.wtj-delete-btn:hover {
  background-color: #c9302c;
}

/* =====================================================
   Responsive Layout (Media Queries)
   ===================================================== */

/* For tablets: stack columns vertically */
@media only screen and (max-width: 768px) {
  #wtj-columns {
    flex-direction: column;
    align-items: center;
  }
  #wtj-uploaded-files,
  #wtj-converted-files {
    margin: 10px auto;
    width: 90%;
  }
}

/* For mobiles: adjust text sizes and button sizes */
@media only screen and (max-width: 480px) {
  .wtj-heading {
    font-size: 20px;
  }
  .wtj-instructions {
    font-size: 14px;
  }
  .wtj-upload-button,
  #wtj-convert-btn,
  #wtj-download-zip-btn {
    width: 90%;
    font-size: 14px;
  }
  .wtj-column-header {
    font-size: 16px;
  }
  .wtj-slider-container {
    width: 100%;
    max-width: 250px;
  }
}



