/* ========================================
   Alphabetical Order Sorter - Page Styles
   ======================================== */

/* ---------- Container & Section ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.section {
  background-color: #ffffff;
  padding: 25px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.section h2 {
  font-size: 22px;
  color: #212529;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f5;
}

.section h3 {
  font-size: 18px;
  color: #212529;
  margin-bottom: 12px;
}

.section p {
  margin-bottom: 12px;
  color: #495057;
}

/* ---------- Page Title ---------- */
.page-title-wrapper {
  background-color: #f8f9fa;
  padding: 20px 25px;
  margin: 0 auto;
  max-width: 1200px;
  text-align: center;
}

.page-title-wrapper h1 {
  font-size: 32px;
  color: #212529;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.page-title-wrapper p {
  font-size: 18px;
  color: #6c757d;
  margin: 0 0 12px 0;
}

.page-title-wrapper .page-subdesc {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
  margin: 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Input/Output Sections ---------- */
.io-section {
  margin-bottom: 20px;
}

.io-section:last-of-type {
  margin-bottom: 0;
}

.io-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.io-label {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.io-meta {
  font-size: 13px;
  color: #6c757d;
}

.io-meta strong {
  color: #007bff;
}

#inputText,
#outputText {
  width: 100%;
  min-height: 180px;
  padding: 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.6;
  margin-bottom: 8px;
}

#inputText:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#outputText {
  background-color: #f8f9fa;
  color: #212529;
}

/* ---------- Separator Bar ---------- */
.separator-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.separator-label {
  font-size: 13px;
  color: #6c757d;
  font-weight: 500;
  white-space: nowrap;
}

.separator-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.separator-radio {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 12px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 13px;
  color: #495057;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.separator-radio:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.separator-radio input[type="radio"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #007bff;
  margin: 0;
}

.separator-radio input[type="radio"]:checked + span {
  color: #007bff;
  font-weight: 500;
}

.separator-radio:has(input[type="radio"]:checked) {
  background-color: #e7f3ff;
  border-color: #007bff;
}

.custom-separator-input {
  padding: 6px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 13px;
  color: #495057;
  width: 100px;
  margin-left: 4px;
}

.custom-separator-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ---------- Options Grid ---------- */
.options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.option-group {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
}

.option-title {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.option-item {
  margin-bottom: 8px;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 0;
  font-size: 14px;
  color: #495057;
  transition: color 0.15s ease;
}

.radio-label:hover,
.checkbox-label:hover {
  color: #212529;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #007bff;
}

/* ---------- Action Bar ---------- */
.action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-top: 15px;
  border-top: 1px solid #f1f3f5;
}

.action-btn {
  background-color: #007bff;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn:hover:not(:disabled) {
  background-color: #0069d9;
}

.action-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #0066cc;
  font-size: 15px;
  padding: 12px 24px;
}

.btn-primary:hover {
  background-color: #0052a3;
}

/* ---------- Case Buttons ---------- */
.case-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.case-btn {
  background-color: #f1f3f5;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.case-btn:hover:not(:disabled) {
  background-color: #e2e6ea;
  border-color: #adb5bd;
}

.case-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Output Section ---------- */
.output-section {
  padding-top: 15px;
  border-top: 1px solid #f1f3f5;
}

/* ---------- Features Grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.feature-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
  margin: 0;
}

/* ---------- Use Cases ---------- */
.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.use-case-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #007bff;
}

.use-case-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.use-case-card h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
}

.use-case-card p {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
  margin: 0;
}

/* ---------- Steps List ---------- */
.steps-list {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px 20px 20px 40px;
  margin: 0 0 15px 0;
}

.steps-list li {
  margin-bottom: 14px;
  line-height: 1.6;
  color: #495057;
  font-size: 15px;
}

.steps-list li:last-child {
  margin-bottom: 0;
}

.steps-list li strong {
  color: #212529;
}

/* ---------- Security Note ---------- */
.security-note {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px 15px;
  font-size: 14px;
  color: #155724;
  line-height: 1.5;
}

.security-note strong {
  color: #0d47a1;
}

/* ---------- Options Table ---------- */
.options-table {
  overflow-x: auto;
  margin-top: 15px;
}

.options-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

.options-table th,
.options-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
}

.options-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.options-table td {
  color: #495057;
}

.options-table td:first-child {
  white-space: nowrap;
}

.options-table code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.options-table tr:hover {
  background-color: #f8f9fa;
}

/* ---------- FAQ ---------- */
.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f3f5;
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-item h3 {
  font-size: 16px;
  color: #212529;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: #495057;
  line-height: 1.6;
}

/* ---------- Privacy Badge ---------- */
.privacy-badge {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px 15px;
  margin-top: 20px;
  font-size: 14px;
  color: #155724;
  font-weight: 500;
  text-align: center;
}

.privacy-badge strong {
  color: #0d47a1;
}

/* ---------- Related Tools ---------- */
.related-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}

.related-tool-card {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.related-tool-card:hover {
  background-color: #e9ecef;
  border-color: #007bff;
  transform: translateY(-2px);
}

.related-tool-card h3 {
  font-size: 15px;
  color: #007bff;
  margin-bottom: 5px;
}

.related-tool-card p {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .page-title-wrapper h1 {
    font-size: 24px;
  }

  .page-title-wrapper p {
    font-size: 16px;
  }

  .section {
    padding: 15px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
  }

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

  .case-buttons {
    flex-direction: column;
  }

  .case-btn {
    width: 100%;
    text-align: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .use-cases {
    grid-template-columns: 1fr;
  }

  .related-tools {
    grid-template-columns: 1fr;
  }

  .steps-list {
    padding-left: 25px;
  }

  #inputText,
  #outputText {
    min-height: 140px;
  }

  .separator-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page-title-wrapper {
    padding: 15px 16px;
  }

  .page-title-wrapper h1 {
    font-size: 22px;
  }

  .container {
    padding: 0 16px 30px;
  }

  .section {
    padding: 12px;
  }

  .option-group {
    padding: 12px;
  }
}
