/* Styl sekcji szczegółów słowa */
.word-page {
  margin: 10px 0;
  padding: 15px;
  background: #fff;
  /* border-radius: 10px; */
  /* box-shadow: 0 3px 12px rgba(0,0,0,0.1); */
  font-family: Arial, sans-serif;
  text-align: left;
}

.word-header {
  display: flex;
  align-items: flex-start;
  justify-content:start ;
  gap: 12px;
}

.word-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #222;
  margin: 0;
}

.word-meaning {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 20px;
}

.word-page .category,
.word-page .subcategory {
  font-size: 1rem;
  color: #444;
  margin-top: 6px;
}

/* .word-page .back-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 8px 16px;
  border: 1px solid #333;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  transition: all 0.2s;
}

.word-page .back-btn:hover {
  background: #cf4040;
  color: #fff;
} */

.back-link {
  display: inline-block;
  margin-top: 30px;
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}
.back-link:hover {
  background: #cf4040;
  color: #fff;
}

/* Styl przycisku audio */
.audio-inline-btn {
  align-items: center;
  display: flex;
  border: none;
  background: #f4f4f4;
  border-radius: 25%;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audio-inline-btn:hover {
  background: #ddd;
}

.audio-inline-btn.playing {
  background: #222;
}

.audio-inline-btn.playing .icon {
  filter: brightness(0) invert(1);
}

.audio-inline-btn .icon {
  width: 20px;
  height: 20px;
}

/* Sekcja przykładów */
/* === Sekcja przykładów użycia === */
.examples-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  padding-left: 15px;
  padding-right: 15px;
}

.examples-title {
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.examples-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-item {
  background: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.example-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

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

.example-user {
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Styl przykładu gwary */
.example-gwara {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #cf4040;
  background: #eadbdb7b;
  border-left: 3px solid #cf4040;
  padding: 6px 10px;
  border-radius: 6px;
}

/* Styl tłumaczenia przykładu */
.example-translation {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 0 0 18px;
  font-family: "Open Sans", sans-serif;
  color: #333;
  background: #f9f9f9;
  border-left: 3px solid #bbb;
  padding: 6px 10px;
  border-radius: 6px;
}

.example-gwara span, .example-translation span {
  line-height: 1.4;
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
} 

/* Styl dla ikonki przy "Gwara:"/"Tłumaczenie:" */
.example-gwara svg,
.example-translation svg {
  width: 1.2em;
  height: 1.2em;  
  vertical-align: middle;
  flex-shrink: 0;           
  margin-right: 4px;
}

/* === Głosowanie na przykłady === */
.example-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s, color 0.2s;
}

.vote-btn svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.vote-btn.active svg {
  color: #0066cc;
  transform: scale(1.1);
}

.vote-count {
  margin: 0 6px;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.vote-btn:hover {
  transform: scale(1.1);
}

.vote-btn.active {
  transform: scale(1.1);
  font-weight: bold;
}
.vote-btn.up.active {
  color: #27ae60;
  transform: scale(1.1);
}
.vote-btn.down.active {
  color: #e74c3c;
  transform: scale(1.1);
  text-decoration: underline;
}

/* === Przycisk "Zgłoś" przy przykładach i komentarzach === */
.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.80rem;
  color: #c0392b;
  opacity: 0.75;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-left: 4px;
  position: relative;
  top: -1px;
  float: right;
}

.report-btn:hover {
  background: rgba(192, 57, 43, 0.1);
  color: #a93226;
  text-decoration: underline;
}

.report-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.comment .report-btn {
  position: absolute;
  top: 30px;
  right: 8px;
}

/* Przycisk "Dodaj przykład" */
.add-example-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.add-example-btn:hover {
  background: #555;
}


/* Sekcja komentarzy */
#comments-section {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  padding-left: 15px;
  padding-right: 15px;
}

#comments-list .comment {
  padding: 10px;
  margin-bottom: 10px;
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.comment p {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
}

/* === Animacja dodania komentarza === */
.comment {
  background: #fafafa;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  border: 1px solid #e3e3e3;
  box-shadow: none;
  transition: background-color 0.6s ease, box-shadow 0.6s ease;
}

@keyframes fadeInComment {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment.highlight { /* Animacja podświetlenia nowego komentarza */
  background: #f0f7ff; 
  box-shadow: 0 0 12px rgba(100, 160, 255, 0.3);
}

.comment strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #222;
}

.comment .date, .example-item .example-date {
  float: right;
  color: #999;
  font-size: 13px;
}

#comments-list .comment strong {
  color: #333;
}

#comment-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#comment-input:focus {
  border-color: #0073e6;
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
  outline: none;
}

/* === Licznik znaków komentarza === */
.comment-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form textarea {
  resize: vertical;
  min-height: 90px;
  padding-right: 50px; /* miejsce na licznik */
}

.comment-counter {
  position: absolute;
  right: 12px;
  bottom: 50px;
  margin-bottom: 5px;
  font-size: 13px;
  color: #777;
  font-style: italic;
  user-select: none;
  pointer-events: none;
}

.comment-counter.warning {
  color: #c76a00;
}

.comment-counter.limit {
  color: #b00020;
  font-weight: bold;
}

.btn {
  align-self: flex-start;
  width: auto;
  padding: 6px 14px;
  background-color: #2c2c2c;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.comment-form .btn:hover {
  background-color: #444;
}

#comment-input.disabled {
  background-color: #eee;
  color: #888;
  cursor: not-allowed;
}

#add-comment-btn {
  display: inline-block;
  background: #2d2d2d;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.delete-comment-btn,
.delete-example-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #b33;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.delete-comment-btn:hover,
.delete-example-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  text-decoration: underline;
}

.comment {
  position: relative;
  padding-bottom: 20px;
}

/* === Responsywność === */
@media (max-width: 768px) {
  .word-page, .word-header {
    padding: 10px;
    text-align: center;
  
}
  .report-btn {
    font-size: 0.9rem;
    margin-top: 6px;
}
}