.token-dialog, .import-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #2a2a2a;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #444;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 1000;
  color: #fff;
}

.history-list {
  overflow-y: auto;  /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  max-height: 65vh;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 300px;
}

.dialog-content h3 {
  margin: 0;
  color: #fff;
  font-size: 1.2rem;
}

.dialog-content p {
  margin: 0;
  color: #ccc;
  font-size: 0.9rem;
}

.token {
  font-size: 2rem;
  font-weight: bold;
  text-align: center;
  margin: 1rem 0;
  letter-spacing: 4px;
  color: #4a9eff;
  background: #222;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #444;
}

.import-dialog input {
  font-size: 1.5rem;
  width: 100%;
  text-align: center;
  letter-spacing: 4px;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #222;
  border: 1px solid #444;
  border-radius: 4px;
  color: #4a9eff;
}

.import-dialog input:focus {
  outline: none;
  border-color: #4a9eff;
}

/* Dialog buttons */
.dialog-content .buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.dialog-content button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.dialog-content .copy-btn,
.dialog-content .import {
  background: #4a9eff;
  color: white;
}

.dialog-content .copy-btn:hover,
.dialog-content .import:hover {
  background: #3a8eef;
}

.dialog-content .close,
.dialog-content .cancel {
  background: transparent;
  color: #ccc;
  border: 1px solid #444;
}

.dialog-content .close:hover,
.dialog-content .cancel:hover {
  background: #333;
}

/* Feedback messages in import dialog */
.feedback {
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 4px;
}

.feedback.error {
  background: rgba(255, 74, 74, 0.1);
  color: #ff4a4a;
}

.feedback.success {
  background: rgba(74, 255, 74, 0.1);
  color: #4aff4a;
}

.feedback.info {
  background: rgba(74, 158, 255, 0.1);
  color: #4a9eff;
}

/* Common styles across all themes */

h2 {
  font-family: monospace;
}

.translation-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.metadata-row {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9em;
}
.history-header {
  margin-bottom: 10px;
}

.history-entry {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.history-timestamp {
  font-size: 0.8rem;
  opacity: 0.7;
}

.entry-controls {
    display: flex;
    align-items: flex-start;
    min-width: 6vw; /* Ensure consistent width for load buttons */
}

.entry-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.load-btn {
    font-family: monospace; /* Makes the numbers align better */
    padding: 0.5rem 1rem;
    background-color: #177a2e; /* Same as save button */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.load-btn:hover {
    background-color: #146926; /* Same as save button hover */
}

.delete-btn {
    align-self: flex-end;
    padding: 0.5rem 1rem;
    background-color: #c41d1d; /* Slightly lighter red on hover */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-btn:hover {
    opacity: 1;
    background-color: #A00000; /* Slightly lighter red on hover */
}

.source-text, .translated-text {
    font-size: 0.95rem;
}

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

.theme-compact {
  .history-entry {
    background: linear-gradient(145deg, #2a2a2a, #333);
    padding: 0.6rem;
    border: 1px solid #444;
  }
  
  .source-text, .translated-text {
    display: inline-block;
    margin-right: 1rem;
  }
  
  .source-text {
    color: #4a9eff;
  }
  
  .translated-text {
    color: #ccc;
  }
  
  .history-timestamp {
    margin-top: 0.2rem;
  }
}

/* New bottom controls bar */
.bottom-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2a2a2a;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #444;
  z-index: 1000;
}

/* Button styling */
.bottom-controls button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
  font-family: monospace;
}

.clear-all-btn {
  background: #ff4a4a;
  color: white;
}

.export-button, .import-button {
  background: #4a9eff;
  color: white;
}

.export-button:hover, .import-button:hover {
  background: #3a8eef;
}

/* Remove old button positioning */
.history-controls {
  display: none;
} 

.history-container h2 {
  margin-top: 0;
}