/* Just Opinion – Widget Styles */

.jo-container {
  max-width: 800px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  color: #333;
  line-height: 1.5;
}

/* Comment Box */
.comment-box {
  margin-bottom: 24px;
}

.comment-box textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.comment-box textarea:focus {
  outline: none;
  border-color: #4a7c59;
  box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.15);
}

.comment-box input[type="text"] {
  width: 100%;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.comment-box input[type="text"]:focus {
  outline: none;
  border-color: #4a7c59;
  box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.15);
}

.comment-box button {
  padding: 8px 20px;
  background-color: #4a7c59;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: background-color 0.15s;
}

.comment-box button:hover {
  background-color: #3d6a4b;
}

.comment-box button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Status */
.jo-status {
  font-size: 0.85rem;
  margin-top: 6px;
  min-height: 1.2em;
}

.jo-status-error {
  color: #c0392b;
}

/* Comment List */
.comment-list {
  margin-top: 16px;
}

.jo-empty {
  color: #888;
  font-style: italic;
  padding: 12px 0;
}

.jo-error {
  color: #c0392b;
  padding: 12px 0;
}

.comment {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.comment:last-child {
  border-bottom: none;
}

.avatar img {
  border-radius: 50%;
  margin-right: 14px;
  width: 42px;
  height: 42px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.username {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}

.timestamp {
  font-size: 0.8rem;
  color: #999;
}

.comment-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .comment {
    flex-direction: column;
  }

  .avatar img {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    margin-right: 0;
  }

  .comment-header {
    flex-direction: column;
    gap: 2px;
  }
}
