/* =============================================================================
   Tickforge Shared Styles
   Used alongside Tailwind CDN
   ============================================================================= */

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; padding: 0.5rem 1rem; border-radius: 0.375rem; transition: all 0.15s; cursor: pointer; border: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover:not(:disabled) { background: #2563eb; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-warning { background: #f97316; color: white; }
.btn-warning:hover:not(:disabled) { background: #ea580c; }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover:not(:disabled) { background: #16a34a; }
.btn-secondary { background: #6b7280; color: white; }
.btn-secondary:hover:not(:disabled) { background: #4b5563; }
.btn-outline { background: white; color: #374151; border: 1px solid #d1d5db; }
.btn-outline:hover:not(:disabled) { background: #f9fafb; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* --- Alerts / Toasts --- */
.alert { padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 0.5rem; font-size: 0.875rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-warning { background: #fef9c3; color: #854d0e; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* --- Spinner --- */
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; }
.spinner-sm { width: 0.75rem; height: 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Form inputs --- */
.input { border: 1px solid #d1d5db; border-radius: 0.375rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
.input:disabled { opacity: 0.5; }
.select { border: 1px solid #d1d5db; border-radius: 0.375rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; outline: none; background: white; }
.select:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
.select:disabled { opacity: 0.5; }

/* --- Cards --- */
.card { background: white; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; }
.card-warning { background: #fffbeb; border-color: #fde68a; }
.card-danger { background: #fef2f2; border-color: #fecaca; }

/* --- Page title --- */
.page-title { font-size: 1.5rem; font-weight: 700; color: #111827; }

/* --- CodeMirror override --- */
.CodeMirror { height: 100%; font-size: 14px; border: 1px solid #d1d5db; border-radius: 0.375rem; }

/* --- Tom Select Bootstrap-like theme --- */
.ts-wrapper.multi .ts-control { border: 1px solid #d1d5db; border-radius: 0.375rem; padding: 0.375rem 0.5rem; min-height: 38px; background: white; }
.ts-wrapper.multi .ts-control:focus-within, .ts-wrapper.multi.focus .ts-control { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25); }
.ts-wrapper .ts-dropdown { border: 1px solid #e5e7eb; border-radius: 0.375rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.ts-wrapper .ts-dropdown .option.active { background: #3b82f6; color: white; }
.ts-wrapper .ts-dropdown .create { color: #6b7280; font-style: italic; }
