/* ==================================== */
/* DOCUMENT SIDEBAR SECTIONS            */
/* Shared styles for Senologie and      */
/* Colposcopie document sidebars        */
/* ==================================== */

.document-sidebar-section {
  transition: opacity var(--transition-normal), max-height var(--transition-normal);
}

/* ==================================== */
/* PRE-FILL SECTION                     */
/* ==================================== */

.prefill-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prefill-content .input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prefill-content .input-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.prefill-content .input-group input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  transition: border-color var(--transition-fast);
}

.prefill-content .input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.prefill-content .input-group input::placeholder {
  color: var(--text-muted);
}

/* ==================================== */
/* TEMPLATES SECTION                    */
/* ==================================== */

.templates-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-upload-zone {
  padding: 12px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--border-radius-md);
  text-align: center;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.template-upload-zone:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-sidebar-hover);
}

.template-upload-zone .btn-secondary {
  width: 100%;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.template-list:empty {
  display: none;
}

.template-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.template-item:hover {
  background: var(--bg-sidebar-hover);
  border-color: var(--border-medium);
}

.template-item.selected {
  border-color: var(--accent-primary);
  background: rgba(217, 119, 87, 0.08);
}

.template-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  flex-shrink: 0;
}

.template-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.template-name {
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-badge {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-delete-template {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  font-size: 14px;
  line-height: 1;
}

.template-item:hover .btn-delete-template {
  opacity: 1;
}

.btn-delete-template:hover {
  color: var(--accent-danger);
}

/* ==================================== */
/* SYNC SECTION                         */
/* ==================================== */

.sync-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sync-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-options .checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.sync-options .checkbox-group input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent-primary);
}

.sync-options .checkbox-group span {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.3;
}

.sync-status {
  font-size: 12px;
  text-align: center;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  min-height: 20px;
  transition: all var(--transition-fast);
}

.sync-status:empty {
  display: none;
}

.sync-status.success {
  background: rgba(93, 138, 102, 0.15);
  color: var(--accent-success);
}

.sync-status.empty {
  background: rgba(140, 140, 140, 0.15);
  color: var(--text-muted);
}

.sync-status.error {
  background: rgba(196, 92, 92, 0.15);
  color: var(--accent-danger);
}

/* ==================================== */
/* SHARED BUTTON STYLES                 */
/* ==================================== */

.document-sidebar-section .btn-secondary,
.document-sidebar-section .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--border-radius-md);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.document-sidebar-section .btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.document-sidebar-section .btn-secondary:hover:not(:disabled) {
  background: var(--bg-sidebar-hover);
  border-color: var(--accent-primary);
}

.document-sidebar-section .btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.document-sidebar-section .btn-primary {
  background: var(--accent-primary);
  color: white;
}

.document-sidebar-section .btn-primary:hover {
  background: var(--accent-primary-hover);
}

.document-sidebar-section .btn-secondary svg,
.document-sidebar-section .btn-primary svg {
  flex-shrink: 0;
}

/* ==================================== */
/* HELP TEXT                            */
/* ==================================== */

.document-sidebar-section .help-text {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  padding: 8px;
  background: var(--bg-sidebar-hover);
  border-radius: var(--border-radius-sm);
  text-align: center;
  line-height: 1.4;
}

/* ==================================== */
/* COLLAPSED SIDEBAR                    */
/* ==================================== */

.sidebar.collapsed .document-sidebar-section {
  display: none !important;
}
