/* ═══════════════════════════════════════════════════════
   utils.css — utility classes for QR Merchant
   Load after reset.css, before any page or component CSS.
   ═══════════════════════════════════════════════════════ */

/* ── Display ── */
.d-none         { display: none !important; }
.d-block        { display: block; }
.d-inline       { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex         { display: flex; }
.d-inline-flex  { display: inline-flex; }
.d-grid         { display: grid; }

/* ── Flex helpers ── */
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.flex-1        { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }

/* ── Gap ── */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* ── Margin ── */
.m-0    { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-3   { margin-top: 12px; }
.mt-4   { margin-top: 16px; }
.mt-5   { margin-top: 20px; }
.mt-6   { margin-top: 24px; }
.mt-8   { margin-top: 32px; }
.mt-10  { margin-top: 40px; }
.mt-12  { margin-top: 48px; }
.mb-0   { margin-bottom: 0; }
.mb-1   { margin-bottom: 4px; }
.mb-2   { margin-bottom: 8px; }
.mb-3   { margin-bottom: 12px; }
.mb-4   { margin-bottom: 16px; }
.mb-5   { margin-bottom: 20px; }
.mb-6   { margin-bottom: 24px; }
.mb-8   { margin-bottom: 32px; }
.mb-10  { margin-bottom: 40px; }
.ml-auto { margin-left: auto; }

/* ── Padding ── */
.p-0  { padding: 0; }
.p-1  { padding: 4px; }
.p-2  { padding: 8px; }
.p-3  { padding: 12px; }
.p-4  { padding: 16px; }
.p-5  { padding: 20px; }
.p-6  { padding: 24px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.py-1 { padding-top: 4px;  padding-bottom: 4px; }
.py-2 { padding-top: 8px;  padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }

/* ── Font size
   Scale: xs=11  sm=12  base=13  md=14  lg=15  xl=16
          2xl=18  3xl=22  4xl=28  5xl=32  6xl=44 ── */
.text-xs   { font-size: 11px; }
.text-sm   { font-size: 12px; }
.text-base { font-size: 13px; }
.text-md   { font-size: 14px; }
.text-lg   { font-size: 15px; }
.text-xl   { font-size: 16px; }
.text-2xl  { font-size: 18px; }
.text-3xl  { font-size: 22px; }
.text-4xl  { font-size: 28px; }
.text-5xl  { font-size: 32px; }
.text-6xl  { font-size: 44px; }

/* ── Font weight ── */
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ── Line height ── */
.leading-none    { line-height: 1; }
.leading-tight   { line-height: 1.15; }
.leading-snug    { line-height: 1.4; }
.leading-normal  { line-height: 1.5; }
.leading-relaxed { line-height: 1.65; }
.leading-loose   { line-height: 1.7; }

/* ── Text alignment ── */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Text transform ── */
.uppercase  { text-transform: uppercase; }
.lowercase  { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* ── Letter spacing ── */
.tracking-tight   { letter-spacing: -0.5px; }
.tracking-normal  { letter-spacing: 0; }
.tracking-wide    { letter-spacing: 0.5px; }
.tracking-wider   { letter-spacing: 1px; }
.tracking-widest  { letter-spacing: 1.5px; }

/* ── Text wrap (balance) ── */
.text-balance { -webkit-text-wrap: balance; text-wrap: balance; }

/* ── Text color ── */
.text-primary { color: var(--clr-primary,      #F97316); }
.text-dark    { color: var(--clr-text,         #111827); }
.text-sub     { color: var(--clr-text-sub,     #6B7280); }
.text-muted   { color: var(--clr-text-muted,   #9CA3AF); }
.text-danger  { color: var(--clr-danger,       #EF4444); }
.text-success { color: var(--clr-success,      #22C55E); }
.text-white   { color: #fff; }

/* ── Background color ── */
.bg-white    { background-color: #fff; }
.bg-soft     { background-color: var(--clr-bg-soft,    #FFF7ED); }
.bg-primary  { background-color: var(--clr-primary,    #F97316); }
.bg-section  { background-color: var(--clr-bg-section, #FFF4E6); }

/* ── Border radius ── */
.rounded-sm   { border-radius: 6px; }
.rounded      { border-radius: 10px; }
.rounded-md   { border-radius: 12px; }
.rounded-lg   { border-radius: 16px; }
.rounded-xl   { border-radius: 20px; }
.rounded-2xl  { border-radius: 28px; }
.rounded-full { border-radius: 9999px; }

/* ── Sizing ── */
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.w-auto  { width: auto; }
.min-w-0 { min-width: 0; }

/* ── Position ── */
.relative { position: relative; }
.absolute  { position: absolute; }
.sticky    { position: sticky; }

/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* ── Misc ── */
.pointer-none   { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.whitespace-nowrap { white-space: nowrap; }
.break-words    { overflow-wrap: break-word; }
.italic         { font-style: italic; }
.shrink-0       { flex-shrink: 0; }
