﻿/* ============================================================
   SignBridge — Tailwind utility replacement
   사용 중인 Tailwind class를 plain CSS로 변환.
   Tailwind CDN 의존성 제거. 의존성 0.
   See: /DESIGN.md for design tokens.
   ============================================================ */

/* ============================================================
   Display & Position
   ============================================================ */

.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.table { display: table; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

/* Position offset */
.top-0 { top: 0; }
.top-3 { top: 0.75rem; }
.top-1\/2 { top: 50%; }
.left-0 { left: 0; }
.left-4 { left: 1rem; }
.-top-1 { top: -0.25rem; }
.-right-1 { right: -0.25rem; }

/* Z-index */
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* ============================================================
   Flexbox & Grid
   ============================================================ */

.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }

/* Gap (flex/grid) */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Space between (Tailwind > selector) */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ============================================================
   Spacing — margin
   ============================================================ */

.mb-0 { margin-bottom: 0; }
.mb-0\.5 { margin-bottom: 0.125rem; }
.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; }

.mt-0\.5 { margin-top: 0.125rem; }
.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; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

/* ============================================================
   Spacing — padding
   ============================================================ */

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }

.pl-12 { padding-left: 3rem; }
.pr-4 { padding-right: 1rem; }

/* ============================================================
   Sizing
   ============================================================ */

.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-9 { width: 2.25rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }

.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-full { height: 100%; }

.min-w-0 { min-width: 0; }
.min-w-\[80px\] { min-width: 80px; }
.min-h-screen { min-height: 100vh; }

.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-prose { max-width: 65ch; }

/* SignBridge 페이지 최대 너비 (Apple/Linear 표준: ~1440px) */
.max-w-page { max-width: 1440px; }

/* ============================================================
   Typography
   ============================================================ */

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================================
   Color — Text
   Apple-style 권장: var(--text-primary), var(--text-secondary), var(--brand) 사용.
   기존 view code 호환을 위해 Tailwind 색상도 유지.
   ============================================================ */

.text-white { color: #ffffff; }

.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }

.text-blue-100 { color: #dbeafe; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-800 { color: #1e40af; }

.text-green-100 { color: #d1fae5; }
.text-green-600 { color: #059669; }
.text-green-700 { color: #047857; }
.text-green-800 { color: #065f46; }

.text-orange-100 { color: #ffedd5; }
.text-orange-600 { color: #ea580c; }
.text-orange-700 { color: #c2410c; }
.text-orange-800 { color: #9a3412; }

.text-red-500 { color: #ef4444; }
.text-red-800 { color: #991b1b; }

.text-yellow-800 { color: #854d0e; }

.text-purple-600 { color: #9333ea; }
.text-purple-700 { color: #7e22ce; }

/* ============================================================
   Color — Background
   ============================================================ */

/* Tailwind 방식: opacity 변수 참조 (bg-opacity-N과 조합 가능) */
.bg-white { background-color: rgba(255, 255, 255, var(--tw-bg-opacity, 1)); }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }

.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }

.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-600 { background-color: #16a34a; }

.bg-orange-50 { background-color: #fff7ed; }
.bg-orange-500 { background-color: #f97316; }
.bg-orange-600 { background-color: #ea580c; }

.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-500 { background-color: #a855f7; }

.bg-red-50 { background-color: #fef2f2; }
.bg-red-500 { background-color: #ef4444; }

.bg-yellow-50 { background-color: #fefce8; }

/* Background gradients (deprecated — Apple style은 단색 권장.
   기존 dashboard.cshtml의 stat-card 호환을 위해 유지. 점진적 cleanup 대상.) */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops, transparent)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops, transparent)); }

.from-blue-400 { --tw-gradient-from: #60a5fa; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(96, 165, 250, 0)); }
.from-blue-500 { --tw-gradient-from: #3b82f6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0)); }
.from-green-500 { --tw-gradient-from: #22c55e; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(34, 197, 94, 0)); }
.from-orange-500 { --tw-gradient-from: #f97316; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 115, 22, 0)); }
.from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0)); }

.to-blue-600 { --tw-gradient-to: #2563eb; }
.to-green-600 { --tw-gradient-to: #16a34a; }
.to-indigo-600 { --tw-gradient-to: #4f46e5; }
.to-indigo-700 { --tw-gradient-to: #4338ca; }
.to-orange-600 { --tw-gradient-to: #ea580c; }

/* Background opacity */
.bg-opacity-20 { --tw-bg-opacity: 0.2; }

/* ============================================================
   Border
   ============================================================ */

.border { border-width: 1px; border-style: solid; border-color: #e5e7eb; }
.border-2 { border-width: 2px; border-style: solid; border-color: #e5e7eb; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: #e5e7eb; }

.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-500 { border-color: #3b82f6; }
.border-green-500 { border-color: #22c55e; }
.border-orange-500 { border-color: #f97316; }
.border-purple-500 { border-color: #a855f7; }

/* ============================================================
   Border Radius
   ============================================================ */

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ============================================================
   Shadow (Apple style: 절제된 그림자)
   ============================================================ */

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* ============================================================
   Misc
   ============================================================ */

.cursor-pointer { cursor: pointer; }

/* mx-auto — 중앙 정렬 (max-w와 조합) */
.mx-auto { margin-left: auto; margin-right: auto; }

/* aspect-square — 정사각형 (icon 버튼) */
.aspect-square { aspect-ratio: 1 / 1; }

.opacity-0 { opacity: 0; }
.opacity-80 { opacity: 0.8; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.whitespace-nowrap { white-space: nowrap; }

.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.transform { transform: translate(0); }
.-translate-y-1\/2 { transform: translateY(-50%); }

/* Tailwind 'list-disc' for ul */
.list-disc { list-style-type: disc; }

/* Word breaking */
.break-all { word-break: break-all; }

/* Underline */
.underline { text-decoration: underline; }

/* ============================================================
   Accessibility — sr-only (screen reader only)
   라디오 input을 시각적으로 숨기되 접근성 유지
   ============================================================ */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* peer marker class (sibling-based selectors) */
.peer { /* marker only — sibling selectors target this */ }

/* ============================================================
   Brand utility (Apple-style design tokens)
   purple/indigo 잔재 cleanup용. View/JS에서 단순 교체 가능.
   ============================================================ */

.bg-brand { background-color: var(--brand); }
.bg-brand-soft { background-color: var(--brand-soft); }
.bg-brand-hover { background-color: var(--brand-hover); }

.text-brand { color: var(--brand); }
.text-brand-hover { color: var(--brand-hover); }
.text-on-brand { color: var(--text-on-brand); }

.border-brand { border-color: var(--brand); }
.border-brand-soft { border-color: var(--brand-soft); }

.hover\:bg-brand:hover { background-color: var(--brand); }
.hover\:bg-brand-hover:hover { background-color: var(--brand-hover); }
.hover\:bg-brand-soft:hover { background-color: var(--brand-soft); }
.hover\:text-brand:hover { color: var(--brand); }
.hover\:text-brand-hover:hover { color: var(--brand-hover); }
.hover\:border-brand:hover { border-color: var(--brand); }

.focus\:border-brand:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.focus\:ring-brand:focus { box-shadow: 0 0 0 3px var(--brand-ring); }

/* ============================================================
   Animation & Transition
   ============================================================ */

.transition-all { transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1); }
.transition-colors { transition: background-color 0.2s, border-color 0.2s, color 0.2s, fill 0.2s, stroke 0.2s; }
.transition-opacity { transition: opacity 0.2s; }
.transition-transform { transition: transform 0.2s; }
.duration-200 { transition-duration: 0.2s; }
.duration-300 { transition-duration: 0.3s; }

/* Spinning animation (loading) */
.fa-spin {
	animation: fa-spin 1s linear infinite;
}

@keyframes fa-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* ============================================================
   Hover & Focus
   ============================================================ */

.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:text-gray-900:hover { color: #111827; }
.hover\:text-blue-700:hover { color: #1d4ed8; }
.hover\:opacity-70:hover { opacity: 0.7; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:from-purple-600:hover { } /* gradient hover — Apple style은 미사용 */
.hover\:to-indigo-700:hover { }

.focus\:border-purple-500:focus { border-color: #a855f7; }
.focus\:outline-none:focus { outline: none; }

/* peer-checked (Tailwind sibling selector emulation) */
.peer:checked + .peer-checked\:bg-opacity-100 { --tw-bg-opacity: 1; }

/* ============================================================
   Responsive — sm: (640px and up)
   ============================================================ */

@media (min-width: 640px) {
	.sm\:block { display: block; }
	.sm\:hidden { display: none; }
	.sm\:inline { display: inline; }
	.sm\:flex-row { flex-direction: row; }
	.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sm\:col-span-2 { grid-column: span 2 / span 2; }
}

/* ============================================================
   Responsive — md: (768px and up)
   ============================================================ */

@media (min-width: 768px) {
	.md\:block { display: block; }
	.md\:hidden { display: none; }
	.md\:flex-row { flex-direction: row; }
	.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.md\:col-span-1 { grid-column: span 1 / span 1; }
	.md\:col-span-2 { grid-column: span 2 / span 2; }
	.md\:col-span-3 { grid-column: span 3 / span 3; }
	.md\:col-span-4 { grid-column: span 4 / span 4; }
	.md\:col-span-5 { grid-column: span 5 / span 5; }
	.md\:col-span-6 { grid-column: span 6 / span 6; }
	.md\:col-span-7 { grid-column: span 7 / span 7; }
	.md\:col-span-8 { grid-column: span 8 / span 8; }
	.md\:col-span-9 { grid-column: span 9 / span 9; }
	.md\:col-span-10 { grid-column: span 10 / span 10; }
	.md\:col-span-11 { grid-column: span 11 / span 11; }
	.md\:col-span-12 { grid-column: span 12 / span 12; }
	.md\:p-4 { padding: 1rem; }
	.md\:p-6 { padding: 1.5rem; }
	.md\:px-4 { padding-left: 1rem; padding-right: 1rem; }
	.md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
	.md\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }
	.md\:mb-6 { margin-bottom: 1.5rem; }
	.md\:mt-0 { margin-top: 0; }
	.md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
	.md\:text-base { font-size: 1rem; line-height: 1.5rem; }
}

/* ============================================================
   Responsive — lg: (1024px and up)
   ============================================================ */

@media (min-width: 1024px) {
	.lg\:hidden { display: none; }
	.lg\:ml-64 { margin-left: 16rem; }
	.lg\:col-span-1 { grid-column: span 1 / span 1; }
	.lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
