/* SourceText Component Styles */

.source-text-container {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.source-text-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
  color: #333;
}

.source-text-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #222;
  white-space: pre-line;
  margin-bottom: 1rem;
}

.source-text-hebrew {
  font-weight: bold;
  color: #2d2d7a;
  text-align:right;
}

.source-text-english {
  color: #333;
}

.source-text-segment {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  transition: background 0.15s;
}

.source-text-segment:hover {
  background-color: #ededf8;
}

.source-text-segment--selected {
  background-color: #d6d6f0;
  border-left: 3px solid #2d2d7a;
  padding-left: calc(0.5rem - 3px);
}

.source-text-language {
  font-size: 0.95rem;
  font-style: italic;
  color: #666;
  margin-bottom: 0.5rem;
}

.source-text-content .footnote-marker,
.source-text-content .footnote {
  display: none;
}
/* CommentaryComponent Styles */

.commentary-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.commentary-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.commentary-section-header {
  font-size: 1rem;
  font-weight: 700;
  color: #2d2d7a;
  border-bottom: 2px solid #2d2d7a;
  padding-bottom: 0.4rem;
  margin-bottom: 0.25rem;
}

.commentary-empty {
  color: #888;
  font-style: italic;
  font-size: 0.9rem;
}

.commentary-loading {
  color: #555;
  font-style: italic;
  font-size: 0.9rem;
}

.commentary-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
  margin-top: 0.25rem;
}

.commentary-text--hebrew {
  direction: rtl;
  text-align: right;
  font-weight: bold;
  color: #2d2d7a;
  margin-bottom: 0.25rem;
}

.commentary-box {
  padding: 15px;
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-size: 14px;
  line-height: 1.5;
}

.commentary-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 5px;
}

.add-comment-btn {
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  background-color: #2d2d7a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.add-comment-btn:hover {
  background-color: #4444aa;
}

.add-comment-form {
  margin-bottom: 1rem;
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid #dee2e6;
}
.add-comment-field {
  margin-bottom: 0.5rem;
}
.add-comment-label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.25rem;
}
.add-comment-input,
.add-comment-textarea {
  width: 100%;
  padding: 0.25rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.add-comment-textarea {
  min-height: 60px;
}
.add-comment-submit,
.add-comment-cancel {
  padding: 0.25rem 0.75rem;
  margin-right: 0.5rem;
  border-radius: 4px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}
.add-comment-submit {
  background-color: #2d2d7a;
  color: #fff;
}
.add-comment-submit:hover {
  background-color: #4444aa;
}
.add-comment-cancel {
  background-color: #ccc;
  color: #222;
}
.add-comment-cancel:hover {
  background-color: #999;
}.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: linear-gradient(135deg, #1a1a5e 0%, #2d2d7a 60%, #4444aa 100%);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  margin: -20px -20px 1.5rem -20px;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header__logo {
  font-size: 1.75rem;
  line-height: 1;
}

.app-header__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f5e6a3;
  letter-spacing: 0.04em;
}

.app-header__status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-header__status--connected {
  color: #7effa0;
  background: rgba(0, 200, 80, 0.15);
}

.app-header__status--disconnected {
  color: #ffaaaa;
  background: rgba(200, 0, 0, 0.15);
}

.app-header__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.app-header__status--connected .app-header__status-dot {
  background: #4cff80;
  box-shadow: 0 0 6px #4cff80;
}

.app-header__status--disconnected .app-header__status-dot {
  background: #ff6666;
  box-shadow: 0 0 6px #ff6666;
}
/* Controls for SourceText input and button */
.source-text-controls {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

input, textarea {
  margin-right: 0.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.source-text-button {
  padding: 0.25rem 0.75rem;
  background-color: #2d2d7a;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.source-text-button:hover {
  background-color: #4444aa;
}
.gemara-app {
  padding: 20px;
  margin: 0 auto;
  max-width: 1200px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Arial', sans-serif;
}

.gemara-app h1 {
  text-align: center;
}

.gemara-app > .source-text-controls,
.gemara-app > .error-message {
  background-color: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.gemara-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.gemara-content > :first-child {
  flex: 3;
  min-width: 0;
}

.gemara-content > :last-child {
  flex: 2;
  min-width: 0;
  position: sticky;
  top: 1rem;
}
