/* Minimal CSS for IPA Translator */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  color: #333;
  background: #fff;
}

body.theme-transition {
  transition: background-color 0.3s, color 0.3s;
}

/* Dark mode styles */
body.dark-mode {
  background: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode textarea {
  background: #2d2d2d;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode textarea[disabled] {
  background: #252525;
}

body.dark-mode .footer {
  border-top-color: #333;
}

body.dark-mode hr {
  border-top-color: #333;
}

body.dark-mode h2 {
  color: #999;
}

body.dark-mode .footer-col h4 {
  color: #e0e0e0;
}

body.dark-mode .footer-col p {
  color: #999;
}

body.dark-mode .footer-col ul li a {
  color: #999;
  background-color: #2d2d2d;
  transition: color 0.2s;
}

body.dark-mode .footer-col ul li a:hover {
  background-color: #3d3d3d;
}

body.dark-mode .footer-bottom {
  border-top-color: #333;
}

body.dark-mode .footer-bottom a {
  color: #999;
}

body.dark-mode a {
  color: #999;
}

body.dark-mode .btn-theme {
  background: #2d2d2d;
  border-color: #444;
}

body.dark-mode .btn-theme:hover {
  background: #3d3d3d;
}

body.dark-mode .btn-theme .icon {
  filter: invert(1);
}

/* Header with titles and dark mode toggle */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.titles {
  flex: 1;
  margin: 0;
}

.titles h1 {
  margin-bottom: 5px;
  margin-top: 0;
}

.titles h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.25rem;
  font-weight: normal;
  color: #666;
}

/* Dark mode toggle button */
.btn-theme {
  background: #f5f5f5;
  border: 1px solid #e1e1e8;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.btn-theme:hover {
  background: #e5e5e5;
}

.btn-theme.btn-theme-transition {
  transition: background-color 0.2s, transform 0.1s;
}

.btn-theme.btn-theme-transition:active {
  transform: scale(0.95);
}

.btn-theme .icon {
  width: 24px;
  height: 24px;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid #e1e1e8;
  margin: 15px 0;
}

textarea {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: vertical;
  min-height: 300px;
  line-height: 1.4;
}

textarea[disabled] {
  background-color: #f5f5f5;
  cursor: default;
}

.form-group {
  margin-bottom: 10px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-check {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 0;
}

.form-check input {
  margin-right: 5px;
}

textarea.form-control, input.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

select.form-control {
  height: 36px;
}

/* Footer - 3 column responsive layout */
.footer {
  margin-top: 40px;
  padding: 30px 0;
  border-top: 1px solid #e1e1e8;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #333;
}

.footer-col p {
  font-size: 15px;
  color: #666;
  margin: 0;
  line-height: 1.6;
}

.footer-col ul li a {
  font-size: 15px;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col ul li a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  background-color: #f5f5f5;
  padding: 4px 10px;
  border-radius: 16px;
  transition: background-color 0.2s;
}

.footer-col ul li a:hover {
  color: #666;
  text-decoration: none;
  background-color: #e5e5e5;
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid #e1e1e8;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: #999;
}

.footer-bottom a {
  color: #666;
  font-weight: 500;
}

.footer-bottom a:hover {
  color: #666;
}

/* Mobile responsive - footer columns stack vertically */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .footer-col h4 {
    font-size: 16px;
  }

  .footer-col ul li a,
  .footer-col p {
    display: block;
    text-align: center;
  }
}

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

/* Two-column layout */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
  align-items: flex-start;
}

.col, .col-md-6, .col-sm {
  flex: 1;
  padding: 0 15px;
  min-width: 300px;
}

/* Inline form controls */
.form-check-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 5px;
}

.form-check-inline input[type="radio"],
.form-check-inline input[type="checkbox"] {
  margin: 0 5px 0 0;
}

.form-check-inline label {
  margin: 0;
  font-weight: normal;
  cursor: pointer;
}

textarea.form-control, input.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  .row {
    flex-direction: column;
  }

  .col {
    min-width: 100%;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  textarea {
    font-size: 16px;
  }
}

a {
  color: #666;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e1e1e8;
}

thead th {
  font-weight: 600;
  border-bottom: 2px solid #e1e1e8;
}

tbody tr:hover {
  background-color: #f5f5f5;
}

table.display {
  margin-top: 10px;
}

/* DataTables pagination */
.dataTables_wrapper {
  padding: 10px 0;
}

.dataTables_info, .dataTables_length, .dataTables_filter {
  font-size: 14px;
  color: #666;
}

.dataTables_filter input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-left: 8px;
}

/* DataTable pagination links */
.dataTables_paginate .pagination {
  display: flex;
  list-style: none;
  margin: 0;
  gap: 5px;
}

.dataTables_paginate .pagination a {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #e1e1e8;
  border-radius: 4px;
  text-decoration: none;
  color: #666;
  background: #fff;
  transition: background-color 0.2s;
}

.dataTables_paginate .pagination a:hover {
  background-color: #f5f5f5;
  text-decoration: none;
}

.dataTables_paginate .pagination .active a {
  background-color: #666;
  color: #fff;
  border-color: #666;
}

.dataTables_paginate .pagination .disabled a {
  color: #999;
  pointer-events: none;
  border-color: #e1e1e8;
  background: #f5f5f5;
}

.dataTables_info {
  padding: 15px 0;
}

/* Dark mode table styles */
body.dark-mode table tr:hover {
  background-color: #2d2d2d;
}

body.dark-mode .dataTables_paginate .pagination a {
  background: #2d2d2d;
  border-color: #444;
  color: #e0e0e0;
}

body.dark-mode .dataTables_paginate .pagination a:hover {
  background-color: #3d3d3d;
}

body.dark-mode .dataTables_paginate .pagination .active a {
  background-color: #666;
  border-color: #666;
}

body.dark-mode .dataTables_paginate .pagination .disabled a {
  background: #252525;
  border-color: #333;
  color: #666;
}

body.dark-mode .dataTables_filter input {
  background-color: #ccc;
}