/* WhatsApp Channel Directory - Main Stylesheet */ /* Uses CSS custom properties for theming */ :root { /* Light theme (default) */ --color-bg-primary: #f9fafb; --color-bg-secondary: #ffffff; --color-bg-tertiary: #f3f4f6; --color-text-primary: #111827; --color-text-secondary: #4b5563; --color-text-muted: #9ca3af; --color-border: #e5e7eb; --color-border-hover: #d1d5db; --color-primary: #059669; --color-primary-hover: #047857; --color-primary-light: #d1fae5; --color-secondary: #3b82f6; --color-danger: #dc2626; --color-warning: #d97706; --color-success: #059669; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); --radius-sm: 0.375rem; --radius: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1); } [data-theme="dark"] { --color-bg-primary: #111827; --color-bg-secondary: #1f2937; --color-bg-tertiary: #374151; --color-text-primary: #f9fafb; --color-text-secondary: #d1d5db; --color-text-muted: #9ca3af; --color-border: #374151; --color-border-hover: #4b5563; --color-primary: #10b981; --color-primary-hover: #34d399; --color-primary-light: #064e3b; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3); --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3); } * { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; scroll-behavior: smooth; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: var(--color-bg-primary); color: var(--color-text-primary); line-height: 1.6; transition: background-color var(--transition), color var(--transition); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* Typography */ h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.25; color: var(--color-text-primary); } h1 { font-size: 2.25rem; } h2 { font-size: 1.875rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; } h5 { font-size: 1.125rem; } h6 { font-size: 1rem; } p { color: var(--color-text-secondary); } a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); } a:hover { color: var(--color-primary-hover); } /* Forms */ input, select, textarea, button { font-family: inherit; font-size: 1rem; } input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea { width: 100%; padding: 0.625rem 0.875rem; background-color: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius); color: var(--color-text-primary); transition: border-color var(--transition), box-shadow var(--transition); } input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); } input::placeholder, textarea::placeholder { color: var(--color-text-muted); } label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--color-text-secondary); margin-bottom: 0.375rem; } /* Buttons */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius); border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; } .btn:disabled { opacity: 0.5; cursor: not-allowed; } .btn-primary { background-color: var(--color-primary); color: white; } .btn-primary:hover:not(:disabled) { background-color: var(--color-primary-hover); } .btn-secondary { background-color: var(--color-bg-tertiary); color: var(--color-text-primary); border: 1px solid var(--color-border); } .btn-secondary:hover:not(:disabled) { background-color: var(--color-border); } .btn-danger { background-color: var(--color-danger); color: white; } .btn-danger:hover:not(:disabled) { background-color: #b91c1c; } .btn-ghost { background-color: transparent; color: var(--color-text-secondary); } .btn-ghost:hover:not(:disabled) { background-color: var(--color-bg-tertiary); color: var(--color-text-primary); } .btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; } .btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; } /* Badges */ .badge { display: inline-flex; align-items: center; padding: 0.125rem 0.5rem; font-size: 0.75rem; font-weight: 600; border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.025em; } .badge-success { background-color: var(--color-primary-light); color: var(--color-success); } .badge-warning { background-color: #fef3c7; color: var(--color-warning); } [data-theme="dark"] .badge-warning { background-color: #78350f; color: #fbbf24; } .badge-danger { background-color: #fee2e2; color: var(--color-danger); } [data-theme="dark"] .badge-danger { background-color: #7f1d1d; color: #fca5a5; } .badge-info { background-color: #dbeafe; color: #2563eb; } [data-theme="dark"] .badge-info { background-color: #1e3a5f; color: #93c5fd; } .badge-dark { background-color: var(--color-bg-tertiary); color: var(--color-text-secondary); } /* Cards */ .card { background-color: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; transition: box-shadow var(--transition), border-color var(--transition); } .card:hover { box-shadow: var(--shadow-lg); border-color: var(--color-border-hover); } /* Grid */ .grid { display: grid; gap: 1.5rem; } .grid-cols-1 { grid-template-columns: repeat(1, 1fr); } .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .grid-cols-4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 640px) { .sm\:grid-cols-1 { grid-template-columns: repeat(1, 1fr); } .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 641px) and (max-width: 1024px) { .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } } @media (min-width: 1025px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); } } /* Flex utilities */ .flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; } /* Spacing */ .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; } .mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; } .p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } /* Text utilities */ .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; } .text-lg { font-size: 1.125rem; } .text-xl { font-size: 1.25rem; } .text-2xl { font-size: 1.5rem; } .text-3xl { font-size: 1.875rem; } .font-medium { font-weight: 500; } .font-semibold { font-weight: 600; } .font-bold { font-weight: 700; } .text-primary { color: var(--color-primary); } .text-secondary { color: var(--color-text-secondary); } .text-muted { color: var(--color-text-muted); } .text-success { color: var(--color-success); } .text-danger { color: var(--color-danger); } .text-warning { color: var(--color-warning); } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; } .line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } /* Forms - specific */ .form-group { margin-bottom: 1rem; } .form-error { color: var(--color-danger); font-size: 0.8125rem; margin-top: 0.375rem; } .form-success { color: var(--color-success); font-size: 0.8125rem; margin-top: 0.375rem; } /* Checkbox & Radio */ input[type="checkbox"], input[type="radio"] { width: 1.125rem; height: 1.125rem; accent-color: var(--color-primary); margin-right: 0.5rem; } /* Select */ select { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5rem 1.5rem; padding-right: 2.5rem; } /* HTMX indicators */ .htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; } .htmx-request .htmx-indicator { opacity: 1; } .htmx-request.htmx-indicator { opacity: 1; } /* Loading spinner */ .spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.75s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Prose (for descriptions) */ .prose { max-width: none; } .prose p { margin: 0.75rem 0; } .prose a { color: var(--color-primary); text-decoration: underline; } .prose a:hover { color: var(--color-primary-hover); } .prose strong { font-weight: 600; } .prose em { font-style: italic; } .prose code { background: var(--color-bg-tertiary); padding: 0.125rem 0.375rem; border-radius: var(--radius-sm); font-size: 0.875em; } .prose pre { background: var(--color-bg-tertiary); padding: 1rem; border-radius: var(--radius); overflow-x: auto; } .prose pre code { background: none; padding: 0; } .prose-gray { color: var(--color-text-secondary); } .prose-invert { color: var(--color-text-secondary); } /* Scrollbar */ ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: var(--color-bg-primary); } ::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); } /* Focus visible for accessibility */ :focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; } /* Skip link */ .skip-link { position: absolute; top: -100%; left: 50%; transform: translateX(-50%); padding: 1rem 2rem; background: var(--color-primary); color: white; border-radius: var(--radius); z-index: 10000; } .skip-link:focus { top: 1rem; } /* Container */ .container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1rem; } @media (min-width: 640px) { .container { padding: 0 1.5rem; } } @media (min-width: 1024px) { .container { padding: 0 2rem; } } /* Animations */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .animate-fade-in { animation: fadeIn 200ms ease-out; } .animate-slide-up { animation: slideUp 300ms ease-out; } /* Print */ @media print { header, footer, nav, .btn, .no-print { display: none !important; } body { background: white; color: black; } a { text-decoration: underline; } } /* Responsive */ @media (max-width: 768px) { .hidden-mobile { display: none !important; } .flex-col-mobile { flex-direction: column !important; } .w-full-mobile { width: 100% !important; } } /* Alpine.js transitions */ [x-cloak] { display: none !important; } /* Custom scrollbar for Firefox */ * { scrollbar-width: thin; scrollbar-color: var(--color-border) var(--color-bg-primary); }