/* Journal Page Styles */

#journal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: white;
  font-family: "Grenze Gotisch", serif;
}

#journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #242425;
  border-radius: 15px;
  border: 2px solid #C4C7C5;
}

.journal-title {
  font-size: 48px;
  margin: 0;
  font-weight: 400;
}

#user-info {
  font-size: 28px;
  color: #C4C7C5;
}

/* normalize toolbar controls (buttons + label) identically */

/* Shared toolbar button style for both button and label */
.toolbar-btn {
  background: #C4C7C5;
  color: #242425;
  border: 2px solid #242425;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Grenze Gotisch", serif;
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: 1.2;
  margin: 0;
  vertical-align: middle;
  outline: none;
  box-sizing: border-box;
}

.toolbar-btn:hover {
  background: #a5a7a6;
}

/* Firefox inner focus/extra padding fix */
.toolbar-btn::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/* Accessible custom focus style */
.toolbar-btn:focus-visible {
  box-shadow: 0 0 0 2px #a5a7a6 inset;
}

#journal-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

#new-entry-section, #entries-section {
  background: #242425;
  border-radius: 15px;
  border: 2px solid #C4C7C5;
  padding: 25px;
}

#new-entry-section h3, #entries-section h3 {
  font-size: 36px;
  margin: 0 0 20px 0;
  font-weight: 400;
  color: #C4C7C5;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
  color: #C4C7C5;
  font-weight: 300;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #555;
  border-radius: 8px;
  background: #333;
  color: white;
  font-family: "Grenze Gotisch", serif;
  font-size: 16px;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #C4C7C5;
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

/* Editor Container */
#editor-container {
  position: relative;
}

#preview-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #333;
  border: 2px solid #555;
  border-radius: 8px;
  padding: 12px;
  overflow-y: auto;
  z-index: 10;
}

#preview-content {
  color: white;
  line-height: 1.6;
}

#preview-content h1, #preview-content h2, #preview-content h3 {
  color: #C4C7C5;
  margin-top: 20px;
  margin-bottom: 10px;
}

#preview-content p {
  margin-bottom: 15px;
}

#preview-content code {
  background: #555;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

#preview-content pre {
  background: #555;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
}

#preview-content blockquote {
  border-left: 4px solid #C4C7C5;
  padding-left: 15px;
  margin-left: 0;
  color: #aaa;
}

.editor-controls {
  margin-top: 10px;
}

.editor-controls button {
  background: #C4C7C5;
  color: #242425;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Grenze Gotisch", serif;
  font-size: 16px;
  font-weight: 500;
}

.editor-controls button:hover {
  background: #a5a7a6;
}

/* File Attachments */
#file-attachments {
  margin-bottom: 10px;
}

#attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.attachment-preview {
  position: relative;
  border: 2px solid #555;
  border-radius: 8px;
  padding: 10px;
  background: #333;
  max-width: 150px;
}

.attachment-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.attachment-preview audio {
  width: 100%;
}

.attachment-preview .remove-attachment {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
}

/* Voice Recording */
#voice-recording {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-btn {
  background: #C4C7C5;
  color: #242425;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Grenze Gotisch", serif;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.3s;
}

.record-btn:hover {
  background: #a5a7a6;
}

.record-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

#recording-status {
  font-size: 16px;
  color: #C4C7C5;
  min-height: 20px;
}

#recording-playback {
  width: 100%;
  margin-top: 10px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.form-actions button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Grenze Gotisch", serif;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.3s;
}

#save-entry {
  background: #4CAF50;
  color: white;
}

#save-entry:hover {
  background: #45a049;
}

#clear-form {
  background: #666;
  color: white;
}

#clear-form:hover {
  background: #555;
}

/* Entries List */
#entries-list {
  max-height: 600px;
  overflow-y: auto;
}

.entry-item {
  background: #333;
  border: 2px solid #555;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

.entry-item:hover {
  border-color: #C4C7C5;
}

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

.entry-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entry-title {
  font-size: 24px;
  margin: 0;
  color: #C4C7C5;
  font-weight: 400;
}

.entry-date {
  font-size: 16px;
  color: #aaa;
}

.entry-type {
  display: inline-block;
  background: #555;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
}

.entry-content {
  color: #ddd;
  line-height: 1.6;
  margin-bottom: 15px;
}

.entry-content h1, .entry-content h2, .entry-content h3 {
  color: #C4C7C5;
  margin-top: 15px;
  margin-bottom: 8px;
}

.entry-content p {
  margin-bottom: 10px;
}

.entry-content code {
  background: #555;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.entry-content pre {
  background: #555;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
}

.entry-content blockquote {
  border-left: 4px solid #C4C7C5;
  padding-left: 15px;
  margin-left: 0;
  color: #aaa;
}

.entry-attachments {
  margin-top: 15px;
}

.entry-attachments h4 {
  font-size: 16px;
  color: #C4C7C5;
  margin: 0 0 10px 0;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachment-item {
  border: 1px solid #555;
  border-radius: 6px;
  padding: 8px;
  background: #444;
  max-width: 120px;
}

.attachment-item img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.attachment-item audio {
  width: 100%;
}

.entry-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.entry-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Grenze Gotisch", serif;
  font-size: 14px;
  font-weight: 500;
}

.edit-entry {
  background: #C4C7C5;
  color: #242425;
}

.edit-entry:hover {
  background: #a5a7a6;
}

.delete-entry {
  background: #ff4444;
  color: white;
}

.delete-entry:hover {
  background: #cc3333;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  #journal-main {
    grid-template-columns: 1fr;
  }
  
  .journal-title {
    font-size: 36px;
  }
  
  #user-info {
    font-size: 18px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
