/* Form Component Styles */

/* Form group wrapper */
.form-group {
  display: block;
  width: 100%;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background-color: var(--card);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: rgba(56, 189, 248, 0.05);
}

/* Improve select dropdown styling for dark theme */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e5e7eb' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background-color: #111827;
  color: #e5e7eb;
  padding: 10px;
}

.form-group select option:hover {
  background-color: #38bdf8;
  color: #111827;
}

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

.form-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Join section (header form) */
.join-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-join {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.input-join:focus {
  border-color: var(--primary);
}

/* Textfield component */
.textfield {
  width: 100% !important;
  margin-bottom: 16px;
  max-width: 100% !important;
  display: block !important;
  position: relative;
}

.textfield__input {
  width: 100% !important;
  font-size: 14px !important;
  border-bottom: 2px solid #e0e0e0 !important;
  padding: 12px 16px !important;
  transition: all 0.2s ease;
  font-family: 'Roboto', sans-serif;
}

.textfield.is-focused .textfield__input {
  border-bottom-color: #2d5aa3 !important;
}

.textfield__input.drag-over {
  background-color: #e3f2fd;
  border-bottom-color: #2d5aa3 !important;
  box-shadow: inset 0 0 0 2px #2d5aa3;
}

/* Character counter */
.char-counter {
  position: absolute;
  top: -28px;
  right: 0;
  font-size: 12px;
  color: #66727e;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.char-counter.near-limit {
  color: #ff9800;
  opacity: 1;
}

.char-counter.at-limit {
  color: #d9534f;
  opacity: 1;
  font-weight: 600;
}

/* Compose area layout */
.compose-column {
  display: inline-block;
  vertical-align: top;
}

#send-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

#attach-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
}

#file_input {
  display: none;
}

/* Attach notes */
.attach-notes-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attach-note {
  color: #888;
  font-size: 13px;
}

.file-size-note {
  color: #888;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
}
