/* ========================================
   ImageTools — QR Code Generator Styles
   ======================================== */

/* --- Tool Header --- */
.tool-header { text-align: center; padding: 48px 0 32px; position: relative; z-index: 1; }
.tool-header .section-label { margin-left: auto; margin-right: auto; }
.tool-header .section-title { margin-left: auto; margin-right: auto; }
.tool-header .section-subtitle { margin-left: auto; margin-right: auto; margin-bottom: 24px; }

.formats-bar { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.format-badge { padding: 4px 12px; background: var(--color-bg-tertiary); border: 1px solid var(--color-border); border-radius: 100px; font-size: 0.75rem; font-weight: 500; color: var(--color-text-secondary); }

/* --- Text Input Zone --- */
.text-input-zone { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; background: var(--color-glass); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 16px; }
.text-input { width: 100%; padding: 16px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.9375rem; color: var(--color-text); outline: none; transition: border-color var(--transition-fast); resize: vertical; min-height: 100px; }
.text-input:focus { border-color: var(--color-border-accent); }
.text-input-zone .btn { align-self: flex-end; }

/* --- Main Workspace --- */
.workspace { margin-top: 32px; display: none; flex-direction: column; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-xl); position: relative; overflow: hidden; }
.workspace.active { display: flex; }

/* --- Workspace Controls --- */
.workspace-controls { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--color-border); background: var(--color-bg); flex-wrap: wrap; gap: 16px; z-index: 20; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.controls-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.controls-right { display: flex; align-items: center; gap: 12px; }

.qr-options { gap: 16px; }
.option-group { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--color-text-secondary); background: var(--color-glass); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 6px 12px; }
.option-group label { font-weight: 500; white-space: nowrap; }
.select-input { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 4px 8px; font-family: var(--font-sans); font-size: 0.8125rem; color: var(--color-text); outline: none; cursor: pointer; }

/* --- QR Stage --- */
.qr-stage { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--color-bg-tertiary); background-image: radial-gradient(rgba(15, 23, 42, 0.07) 1px, transparent 1px); background-size: 24px 24px; overflow: auto; padding: 48px; max-height: 60vh; }
.qr-body { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-md); min-height: 300px; min-width: 300px; }
#qrcode { display: none; }
#qrcode canvas, #qrcode img { max-width: 100%; max-height: 300px; border-radius: var(--radius-sm); }
.placeholder-text { color: var(--color-text-dim); font-size: 0.875rem; text-align: center; position: absolute; }

/* --- Sticky Bottom Bar --- */
.workspace-bottom-bar { padding: 16px 24px; border-top: 1px solid var(--color-border); background: var(--color-bg); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 20; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.summary-text { font-size: 0.875rem; color: var(--color-text-secondary); display: flex; align-items: center; gap: 8px; }
.bottom-actions { display: flex; align-items: center; gap: 12px; }

.btn-download, .btn-copy { min-width: 160px; padding: 14px 24px; font-size: 0.9375rem; font-weight: 600; }
.btn-download { box-shadow: 0 0 20px rgba(var(--glow-rgb), 0.2); }
.btn-download:disabled, .btn-copy:disabled { background: var(--color-text-dim); cursor: not-allowed; box-shadow: none; opacity: 0.7; }

/* --- Social Share Section --- */
.share-section { margin-top: 32px; padding: 32px; background: var(--color-glass); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; display: none; }
.share-section.active { display: block; }
.share-title { font-size: 1rem; font-weight: 500; margin-bottom: 6px; }
.share-subtitle { font-size: 0.875rem; color: var(--color-text-muted); margin-bottom: 20px; }
.share-buttons { display: flex; align-items: center; justify-content: center; gap: 12px; }
.share-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text-secondary); transition: all var(--transition-fast); }
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.share-btn.twitter:hover { background: #000; color: #fff; border-color: #000; }
.share-btn.facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.share-btn.linkedin:hover { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.share-btn.whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.share-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .workspace-controls { flex-direction: column; align-items: stretch; }
  .qr-options { justify-content: center; }
  .qr-stage { padding: 24px; }
  .workspace-bottom-bar { flex-direction: column; text-align: center; }
  .bottom-actions { width: 100%; flex-direction: column; }
  .btn-download, .btn-copy { width: 100%; }
}