/* Swiss French Numbers App Styles */

:root {
  --primary-bg: #f4f4f4;
  --guide-color: #888;
  --text-size: 16px;
  --mobile-text-size: 14px;
  --transition-duration: 0.15s;
  --table-bg: #fff;
  --accent: #4a6bd6;
  --accent-alt: #5dade2;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: var(--primary-bg);
  text-align: center;
  margin: 0;
  padding: 12px;
  line-height: 1.4;
}

h1 {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 24px;
  color: #333;
}

p {
  margin: 5px 0 20px;
  font-size: 14px;
  color: #666;
}

/* Table layout */
.table-container {
  overflow-x: hidden;
  margin: 0 auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  background: var(--table-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

th,
td {
  padding: 8px 4px;
  border: 1px solid #e0e0e0;
  text-align: center;
}

th {
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 14px;
}

tr:nth-child(even) {
  background: #fafafa;
}

.number-cell {
  font-weight: 700;
  color: var(--accent-alt);
  cursor: pointer;
  transition: background 0.2s;
  font-size: 12px;
  line-height: 1.2;
}

.number-cell:hover {
  background: rgba(74, 107, 214, 0.1);
}

.btn {
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  margin: 0 4px 8px;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #3a59b0;
}

.btn:active {
  transform: translateY(1px);
}

.number-speaker {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 16px auto 0;
}

.number-speaker input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 16px;
  background: #fff;
}

.number-speaker input:focus {
  outline: 2px solid rgba(74, 107, 214, 0.25);
  outline-offset: 1px;
  border-color: var(--accent);
}

.number-speaker .btn {
  margin: 0;
  white-space: nowrap;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  p {
    font-size: 12px;
  }

  body {
    padding: 7px;
  }

  th,
  td {
    padding: 6px 4px;
  }

  table {
    width: 100%;
    max-width: 100%;
  }

  .number-cell {
    font-size: 11px;
    line-height: 1.15;
    word-break: break-word;
  }

  .number-speaker {
    gap: 6px;
  }

  .number-speaker input {
    padding: 10px 10px;
    font-size: 15px;
  }

  .number-speaker .btn {
    padding-left: 10px;
    padding-right: 10px;
  }

  .top-banner {
    margin-left: -5px;
    margin-right: -5px;
    width: calc(100% + 10px);
  }
}

/* Additional utility classes for future enhancements */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

.hidden {
  display: none;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Attribution footer */
.attribution {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  margin-top: 20px;
  padding: 0 10px 10px;
  text-align: center;
}

.attribution a {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
}

.audio-toggle {
  text-align: center;
  margin: 10px 0 20px;
  font-size: 14px;
}

.audio-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  transition: background 0.2s ease;
}

.audio-toggle label:hover {
  background: rgba(0, 0, 0, 0.1);
}

.audio-toggle input[type="checkbox"] {
  margin: 0;
}

.top-banner {
  background-color: rgb(226, 46, 64);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-left: -12px;
  margin-right: -12px;
  width: calc(100% + 24px);
}

.top-banner img {
  height: 50px;
  display: block;
}

.top-banner h1,
.top-banner p {
  margin: 0;
  color: white;
}


