local RUI = LibStub("RUI-1.0")
if not RUI then return end

-- ─── Color palette (sourced from DandersFrames) ───────────────────────────────
RUI.C = {
    BG      = {r=0.08, g=0.08, b=0.08, a=0.95},  -- near-black panel canvas
    PANEL   = {r=0.12, g=0.12, b=0.12, a=1.00},  -- section fills, title bars
    ELEMENT = {r=0.18, g=0.18, b=0.18, a=1.00},  -- button / input background
    BORDER  = {r=0.25, g=0.25, b=0.25, a=1.00},  -- 1px edges on widgets and panels
    ACCENT  = {r=0.45, g=0.45, b=0.95, a=1.00},  -- purple-blue; title bar sep, active states
    HOVER   = {r=0.22, g=0.22, b=0.22, a=1.00},  -- button OnEnter
    PRESS   = {r=0.13, g=0.13, b=0.13, a=1.00},  -- button OnMouseDown (darker than ELEMENT)
    TEXT    = {r=0.90, g=0.90, b=0.90, a=1.00},  -- primary text, section headings  (DF: C_TEXT)
    DIM     = {r=0.75, g=0.75, b=0.75, a=1.00},  -- labels above controls, secondary text
    TEXT_DIM= {r=0.60, g=0.60, b=0.60, a=1.00},  -- dimmed icon/hint text (DF: C_TEXT_DIM = 0.6)
    GOLD    = {r=0.72, g=0.56, b=0.12, a=0.80},  -- section box borders (amber delineation)
}

-- ─── Font specs ───────────────────────────────────────────────────────────────
-- Use HEADING for section titles, SMALL/DIM for control labels, VALUE for readouts.
RUI.F = {
    TITLE   = {face="Fonts\\FRIZQT__.TTF", size=12, flags=""},         -- dialog title bar; Dialog.lua uses "GameFontNormal" template directly (= DF's DFFontNormal)
    HEADING = {face="Fonts\\ARIALN.TTF", size=13, flags="OUTLINE"},  -- panel section headers
    BODY    = {face="Fonts\\ARIALN.TTF", size=12, flags="OUTLINE"},  -- button labels, checkboxes
    SMALL   = {face="Fonts\\FRIZQT__.TTF", size=10, flags=""},      -- labels above controls; matches GameFontHighlightSmall
    VALUE   = {face="Fonts\\FRIZQT__.TTF", size=11, flags="OUTLINE"},-- slider value readouts
}

-- ─── Spacing constants ────────────────────────────────────────────────────────
RUI.PAD         = 16   -- left/right panel edge padding
RUI.BORDER_SIZE = 1    -- default border edge thickness
RUI.CONTROL_GAP = 4    -- vertical gap below each control row

-- Control heights (the control widget itself, not including its label)
RUI.LABEL_H  = 14   -- height of a SMALL label row above a control
RUI.HEADER_H = 22   -- section Header() text height
RUI.SLIDER_H = 8    -- Slider track height     (full row = LABEL_H + SLIDER_H + 12 + CONTROL_GAP = 38)
RUI.DD_H     = 24   -- Dropdown button height  (full row = LABEL_H + DD_H     + CONTROL_GAP = 42)
RUI.INPUT_H  = 20   -- Input EditBox height    (full row = LABEL_H + INPUT_H  + CONTROL_GAP = 38)
RUI.CHECK_H  = 20   -- Checkbox height         (full row = CHECK_H + CONTROL_GAP             = 24)
RUI.COLOR_H  = 24   -- Color button height     (full row = COLOR_H  + CONTROL_GAP = 28, no separate label row)
RUI.BTN_H    = 22   -- Standalone button height (full row = BTN_H  + CONTROL_GAP             = 26)

-- Standard widths for two-column layout (panel ~700px, PAD 16 each side = 668 usable)
RUI.DD_W     = 300   -- full-width dropdown
RUI.DD_HALF  = 270   -- half-width dropdown (two-column left)
RUI.SLD_W    = 430   -- full-width slider
RUI.SLD_HALF = 220   -- half-width slider (two-column right)
RUI.COL2_X   = 306   -- x of right column (PAD + DD_HALF + 20)
RUI.COL2_W   = 238   -- right column control width (560px dialog: 560 - PAD - COL2_X)
