-- HDG_StyleDefinitions.lua
-- Hand-authored style definitions for the Style tab
-- Each style: displayName, icon, tier, color, description
-- V2: query{}, boost{}, anti{} for faceted scoring engine
-- Thematic styles: subcategories[].query for item routing, minScore for quality bar

HDG_StyleDefinitions = {

    -- ========================================================================
    -- ROOM CONCEPTS (tier = "thematic")
    -- ========================================================================

    ["rustic-tavern"] = {
        displayName = "Rustic Tavern",
        icon = "Interface\\Icons\\INV_Drink_10",
        tier = "thematic",
        color = { r = 0.6, g = 0.4, b = 0.2 },
        description = "A smoke-stained inn where every plank has a story. Rough-hewn tables bear the rings of a thousand tankards, iron fixtures hold sputtering candles, and the hearth never goes cold.",
        minScore = 1.5,
        query = { mood = { "rustic" }, formality = { "humble", "common" } },
        boost = {
            mood = { "cozy" },
            room = { "tavern", "kitchen", "dining-room", "cellar" },
            material = { "rough-wood", "wrought-iron", "ceramic", "rope-twine", "leather" },
            condition = { "worn", "weathered" },
            color = { "brown", "tan", "dark-brown", "amber" },
            motif = { "food-drink", "flame-fire" },
            light = { "candle-flame", "lantern", "brazier" },
        },
        anti = {
            mood = { "royal", "arcane", "void", "gothic", "holy" },
            formality = { "opulent" },
            material = { "crystal", "silk-velvet", "gold-gilt" },
            culture = { "nightborne", "void-elf", "ethereal", "nerubian" },
        },
        subcategories = {
            { key = "bar",       label = "The Bar",
              query = { category = { "container", "storage" } } },
            { key = "seating",   label = "Seating & Tables",
              query = { category = { "seating", "table" } } },
            { key = "hearth",    label = "Food & Hearth",
              query = { category = { "food-drink", "utility" } } },
            { key = "ambiance",  label = "Ambiance",
              query = { category = { "lighting", "wall-art", "rug", "textile", "musical", "misc" } } },
        },
    },

    ["cozy-cottage"] = {
        displayName = "Cozy Cottage",
        icon = "Interface\\Icons\\INV_Fabric_Wool_01",
        tier = "thematic",
        color = { r = 0.8, g = 0.6, b = 0.4 },
        description = "Where the kettle is always warm and the quilts always thick. Soft cushions, dried flowers on the windowsill, and the smell of bread drifting from the kitchen.",
        minScore = 1.5,
        query = { mood = { "cozy" }, formality = { "humble", "common" } },
        boost = {
            room = { "bedroom", "kitchen", "lounge", "dining-room", "nursery" },
            material = { "woven-fabric", "rough-wood", "wicker-rattan", "leather", "ceramic" },
            condition = { "pristine", "worn" },
            color = { "tan", "brown", "ivory", "amber", "red" },
            motif = { "floral", "food-drink" },
            light = { "candle-flame", "lantern" },
        },
        anti = {
            mood = { "military", "void", "gothic", "industrial" },
            formality = { "opulent" },
            material = { "crystal", "gold-gilt", "bone-horn" },
            culture = { "nerubian", "forsaken", "void-elf", "ethereal" },
        },
        subcategories = {
            { key = "furniture", label = "Furniture",
              query = { category = { "seating", "table", "storage" } } },
            { key = "soft",      label = "Soft & Cozy",
              query = { category = { "bed", "textile", "rug" } } },
            { key = "kitchen",   label = "Kitchen & Pantry",
              query = { category = { "food-drink", "container" } } },
            { key = "warmth",    label = "Warmth & Light",
              query = { category = { "lighting", "wall-art", "utility", "misc" } } },
        },
    },

    ["arcane-study"] = {
        displayName = "Arcane Study",
        icon = "Interface\\Icons\\INV_Misc_Book_09",
        tier = "thematic",
        color = { r = 0.4, g = 0.3, b = 0.8 },
        description = "Towering shelves of forbidden knowledge, crystal spheres casting pale violet light, and the faint hum of wards etched into every surface. Knowledge is power -- organize it accordingly.",
        minScore = 1.0,
        query = { mood = { "scholarly", "arcane" } },
        boost = {
            room = { "library", "study" },
            material = { "crystal", "polished-wood", "stained-glass", "glass" },
            motif = { "runic", "celestial" },
            formality = { "refined" },
            color = { "purple", "blue", "teal", "gold", "violet" },
            light = { "crystal-glow", "magical-glow" },
        },
        anti = {
            mood = { "rustic", "military", "industrial", "primitive" },
            formality = { "crude" },
            condition = { "damaged", "ruined" },
            material = { "bone-horn", "rope-twine", "fur-pelt" },
        },
        subcategories = {
            { key = "tomes",    label = "Books & Scrolls",
              query = { category = { "book-scroll" } } },
            { key = "shelves",  label = "Shelves & Cases",
              query = { category = { "storage", "container" } } },
            { key = "desk",     label = "Desk & Seating",
              query = { category = { "table", "seating" } } },
            { key = "ambiance", label = "Arcane Ambiance",
              query = { category = { "lighting", "wall-art", "statue", "misc", "textile" } } },
        },
    },

    ["feast-hall"] = {
        displayName = "Feast Hall",
        icon = "Interface\\Icons\\INV_Misc_Food_15",
        tier = "thematic",
        color = { r = 0.8, g = 0.6, b = 0.1 },
        description = "Banners snap in the draft of the great doors, platters of roast boar stretch the length of the table, and goblets overflow with Dalaran Red. Tonight, every seat at the king's table is yours.",
        minScore = 2.5,
        query = { mood = { "festive", "royal" }, formality = { "common", "refined", "opulent" }, room = { "great-hall", "dining-room", "tavern" } },
        boost = {
            material = { "polished-wood", "gold-gilt", "polished-metal" },
            motif = { "heraldic", "food-drink" },
            color = { "gold", "red", "purple", "dark-red" },
        },
        anti = {
            mood = { "gothic", "void", "industrial", "primitive", "holy" },
            condition = { "damaged", "ruined" },
            material = { "bone-horn", "rope-twine" },
            culture = { "nerubian", "forsaken" },
        },
        subcategories = {
            { key = "seating",  label = "Grand Seating",
              query = { category = { "seating" } } },
            { key = "spread",   label = "The Spread",
              query = { category = { "table", "food-drink" } } },
            { key = "decor",    label = "Hall Decor",
              query = { category = { "wall-art", "rug", "textile", "lighting", "musical" } } },
            { key = "display",  label = "Trophies & Vessels",
              query = { category = { "trophy", "container", "storage", "statue", "misc", "utility" } } },
        },
    },

    ["workshop"] = {
        displayName = "Workshop",
        icon = "Interface\\Icons\\Trade_BlackSmithing",
        tier = "thematic",
        color = { r = 0.5, g = 0.4, b = 0.3 },
        description = "The forge never cools, the anvil rings from dawn to dusk, and every surface is buried under half-finished projects. If it can be hammered, welded, or wound with a spring -- it belongs here.",
        minScore = 1.5,
        query = { mood = { "industrial" }, room = { "workshop" } },
        boost = {
            material = { "wrought-iron", "rough-wood", "bronze-copper", "polished-metal" },
            motif = { "mechanical", "flame-fire" },
            condition = { "worn", "weathered" },
            color = { "black", "dark-brown", "gray", "amber", "dark-gray" },
            formality = { "crude", "humble" },
        },
        anti = {
            mood = { "royal", "arcane", "holy", "whimsical" },
            formality = { "opulent" },
            material = { "silk-velvet", "crystal", "gold-gilt" },
            culture = { "nightborne", "void-elf", "ethereal" },
        },
        subcategories = {
            { key = "tools",    label = "Forge & Tools",
              query = { category = { "tool", "utility" } } },
            { key = "storage",  label = "Storage",
              query = { category = { "container", "storage" } } },
            { key = "fixtures", label = "Furnishings",
              query = { category = { "seating", "table", "rug" } } },
            { key = "heavy",    label = "Heavy Gear",
              query = { category = { "misc", "lighting", "weapon-armor" } } },
        },
    },

    ["sacred-shrine"] = {
        displayName = "Sacred Shrine",
        icon = "Interface\\Icons\\Spell_Holy_SurgeOfLight",
        tier = "thematic",
        color = { r = 0.9, g = 0.85, b = 0.5 },
        description = "Incense coils toward a vaulted ceiling, every candle is lit, and every mosaic tells a story of sacrifice and redemption. Enter quietly -- the Light remembers.",
        minScore = 1.5,
        query = { mood = { "holy" }, room = { "shrine" } },
        boost = {
            motif = { "holy-symbol", "celestial" },
            material = { "polished-stone", "carved-stone", "stained-glass", "gold-gilt" },
            formality = { "refined", "opulent" },
            color = { "gold", "white", "purple", "ivory" },
            light = { "candle-flame", "crystal-glow" },
        },
        anti = {
            mood = { "gothic", "void", "industrial", "military" },
            motif = { "skull-bone", "demonic", "web-spider", "eye-tentacle" },
            material = { "bone-horn", "rope-twine" },
            culture = { "forsaken", "nerubian" },
        },
        subcategories = {
            { key = "sacred",   label = "Sacred Objects",
              query = { category = { "statue", "misc" } } },
            { key = "furnish",  label = "Furnishings",
              query = { category = { "seating", "table", "rug", "textile" } } },
            { key = "ritual",   label = "Ritual & Light",
              query = { category = { "lighting", "container", "utility" } } },
            { key = "arch",     label = "Architecture",
              query = { category = { "wall-art", "structural" } } },
        },
    },

    ["garden-retreat"] = {
        displayName = "Garden Retreat",
        icon = "Interface\\Icons\\INV_Misc_Flower_02",
        tier = "thematic",
        color = { r = 0.3, g = 0.7, b = 0.4 },
        description = "Moonlight filters through ancient boughs, water murmurs over moss-covered stones, and every path leads deeper into green. The world's troubles cannot follow you here.",
        minScore = 1.0,
        query = { mood = { "nature" } },
        boost = {
            room = { "garden", "greenhouse", "balcony" },
            material = { "organic-plant", "rough-stone", "carved-stone", "wicker-rattan" },
            motif = { "vine-leaf", "floral", "animal" },
            color = { "green", "dark-green", "teal", "brown", "ivory" },
            category = { "plant", "outdoor" },
        },
        anti = {
            mood = { "military", "industrial", "void", "gothic" },
            material = { "wrought-iron", "polished-metal", "bone-horn" },
            motif = { "skull-bone", "mechanical", "demonic" },
        },
        subcategories = {
            { key = "green",     label = "Living Green",
              query = { category = { "plant", "outdoor" } } },
            { key = "furniture", label = "Garden Furniture",
              query = { category = { "seating", "table", "rug" } } },
            { key = "stone",     label = "Water & Stone",
              query = { category = { "statue", "utility", "misc" } } },
            { key = "ornament",  label = "Light & Ornament",
              query = { category = { "lighting", "wall-art", "container" } } },
        },
    },

    ["war-camp"] = {
        displayName = "War Camp",
        icon = "Interface\\Icons\\Ability_Warrior_ShieldWall",
        tier = "thematic",
        color = { r = 0.7, g = 0.2, b = 0.2 },
        description = "Mud-stained maps pinned to a command table, weapons racked three deep, and the smell of oiled leather. This is where orders are given and victories are planned.",
        minScore = 1.0,
        query = { mood = { "military" } },
        boost = {
            room = { "armory", "trophy-room" },
            material = { "wrought-iron", "polished-metal", "leather", "rough-wood" },
            motif = { "heraldic", "dragon" },
            formality = { "crude", "humble", "common" },
            color = { "dark-red", "black", "dark-gray", "red", "silver" },
            category = { "weapon-armor", "trophy" },
        },
        anti = {
            mood = { "cozy", "whimsical", "holy" },
            formality = { "opulent" },
            material = { "silk-velvet", "crystal", "wicker-rattan" },
            motif = { "floral" },
        },
        subcategories = {
            { key = "arsenal",  label = "Arsenal",
              query = { category = { "weapon-armor", "tool" } } },
            { key = "command",  label = "Command Post",
              query = { category = { "table", "seating", "storage" } } },
            { key = "trophies", label = "Trophies & Banners",
              query = { category = { "trophy", "wall-art", "textile", "rug" } } },
            { key = "fixtures", label = "Camp Fixtures",
              query = { category = { "lighting", "container", "misc", "utility" } } },
        },
    },

    ["seafarers-haven"] = {
        displayName = "Seafarer's Haven",
        icon = "Interface\\Icons\\INV_Misc_Spyglass_03",
        tier = "thematic",
        color = { r = 0.2, g = 0.5, b = 0.7 },
        description = "Salt-crusted lanterns swing from the rafters, charts and compasses litter the captain's desk, and every rope has been tied and retied a hundred times. The sea calls -- best keep one eye on the horizon.",
        minScore = 1.0,
        query = { mood = { "seafaring" } },
        boost = {
            room = { "tavern", "balcony" },
            material = { "rope-twine", "rough-wood", "bronze-copper", "glass" },
            motif = { "wave-water", "animal" },
            color = { "blue", "dark-blue", "teal", "sky-blue", "tan" },
            condition = { "worn", "weathered" },
        },
        anti = {
            mood = { "arcane", "void", "holy", "gothic" },
            formality = { "opulent" },
            material = { "crystal", "gold-gilt", "silk-velvet" },
            motif = { "demonic", "holy-symbol", "eye-tentacle" },
        },
        subcategories = {
            { key = "navigation", label = "Navigation",
              query = { category = { "book-scroll", "tool", "misc" } } },
            { key = "ship",       label = "Ship Fixtures",
              query = { category = { "lighting", "utility", "container" } } },
            { key = "furniture",  label = "Seaside Furnishings",
              query = { category = { "seating", "table", "storage", "rug" } } },
            { key = "nautical",   label = "Nautical Decor",
              query = { category = { "wall-art", "trophy", "textile", "statue" } } },
        },
    },

    ["dark-sanctum"] = {
        displayName = "Dark Sanctum",
        icon = "Interface\\Icons\\Spell_Shadow_AntiShadow",
        tier = "thematic",
        color = { r = 0.5, g = 0.2, b = 0.6 },
        description = "Shadows pool in every corner, pale flames burn without heat, and the whispers never quite form words. The line between power and corruption is drawn in chalk on the floor.",
        minScore = 1.0,
        query = { mood = { "gothic", "void" } },
        boost = {
            room = { "cellar", "shrine" },
            material = { "bone-horn", "carved-stone", "crystal", "wrought-iron" },
            motif = { "skull-bone", "eye-tentacle", "demonic", "web-spider" },
            color = { "dark-purple", "purple", "black", "dark-gray", "violet" },
            culture = { "forsaken", "nerubian", "void-elf" },
            light = { "magical-glow", "crystal-glow" },
            condition = { "damaged", "weathered" },
        },
        anti = {
            mood = { "cozy", "whimsical", "festive", "nature" },
            material = { "wicker-rattan", "organic-plant" },
            motif = { "floral", "food-drink" },
            color = { "gold", "amber", "ivory" },
        },
        subcategories = {
            { key = "relics",   label = "Dark Relics",
              query = { category = { "statue", "misc", "trophy" } } },
            { key = "furnish",  label = "Grim Furnishings",
              query = { category = { "seating", "table", "storage", "bed" } } },
            { key = "shadow",   label = "Shadow & Flame",
              query = { category = { "lighting", "wall-art", "textile" } } },
            { key = "ritual",   label = "Ritual Tools",
              query = { category = { "container", "tool", "utility", "book-scroll" } } },
        },
    },

    -- ========================================================================
    -- THEMED CONCEPTS (tier = "themed")
    -- ========================================================================

    ["witchs-den"] = {
        displayName = "Witch's Den",
        icon = "Interface\\Icons\\Trade_Alchemy",
        tier = "themed",
        color = { r = 0.4, g = 0.6, b = 0.3 },
        description = "Jars of things that shouldn't be jarred line crooked shelves, a cauldron bubbles over a smokeless flame, and the resident cat watches with eyes that know too much. Wipe your feet -- those mushrooms are load-bearing.",
        minScore = 1.0,
        query = { mood = { "mysterious" } },
        boost = {
            room = { "cellar", "kitchen", "greenhouse" },
            material = { "ceramic", "glass", "organic-plant", "carved-wood", "bone-horn" },
            motif = { "eye-tentacle", "vine-leaf", "animal" },
            color = { "purple", "dark-green", "teal", "dark-purple", "violet" },
            category = { "book-scroll", "plant", "container" },
            light = { "magical-glow", "candle-flame" },
        },
        anti = {
            mood = { "military", "royal", "industrial" },
            formality = { "opulent", "refined" },
            material = { "gold-gilt", "polished-metal" },
            motif = { "heraldic", "mechanical" },
        },
        subcategories = {
            { key = "reagents",  label = "Potions & Reagents",
              query = { category = { "container", "food-drink", "plant" } } },
            { key = "texts",     label = "Forbidden Texts",
              query = { category = { "book-scroll", "misc" } } },
            { key = "furnish",   label = "Den Furnishings",
              query = { category = { "seating", "table", "storage", "rug", "textile" } } },
            { key = "oddities",  label = "Oddities & Omens",
              query = { category = { "lighting", "statue", "wall-art", "tool", "pet-creature", "utility" } } },
        },
    },

    ["tribal-lodge"] = {
        displayName = "Tribal Lodge",
        icon = "Interface\\Icons\\INV_Misc_Drum_01",
        tier = "themed",
        color = { r = 0.7, g = 0.4, b = 0.2 },
        description = "Pelts hang thick on the walls, totems carved from ancient wood guard every entrance, and the fire pit at the center has burned since before the first roads. Ancestors are listening -- speak with respect.",
        minScore = 1.0,
        query = { mood = { "primitive" } },
        boost = {
            room = { "great-hall", "trophy-room", "stable" },
            material = { "fur-pelt", "bone-horn", "rough-wood", "leather", "rough-stone" },
            motif = { "tribal", "animal", "flame-fire" },
            culture = { "tauren", "troll", "zandalari", "vulpera" },
            color = { "brown", "dark-brown", "tan", "red", "amber" },
            formality = { "crude", "humble" },
            condition = { "weathered", "worn" },
        },
        anti = {
            mood = { "arcane", "royal", "scholarly" },
            formality = { "opulent", "refined" },
            material = { "crystal", "gold-gilt", "silk-velvet", "polished-stone", "glass" },
            motif = { "celestial" },
        },
        subcategories = {
            { key = "pelts",     label = "Pelts & Trophies",
              query = { category = { "trophy", "textile", "rug" } } },
            { key = "art",       label = "Tribal Art",
              query = { category = { "statue", "wall-art", "misc" } } },
            { key = "furnish",   label = "Lodge Furnishings",
              query = { category = { "seating", "table", "storage", "bed" } } },
            { key = "fire",      label = "Fire & Light",
              query = { category = { "lighting", "utility", "container", "tool" } } },
        },
    },

    -- ========================================================================
    -- FACTION THEMES (tier = "faction")
    -- ========================================================================

    ["alliance"] = {
        displayName = "Alliance",
        icon = "Interface\\Icons\\Inv_BannerPVP_02",
        tier = "faction",
        color = { r = 0.2, g = 0.4, b = 0.8 },
        description = "Stone keeps, stained glass windows, and the banners of seven proud peoples. From Stormwind's marble halls to Ironforge's fiery depths, the Alliance builds to last.",
        minScore = 1.0,
        query = { culture = { "human", "dwarf", "gnome", "night-elf", "draenei", "worgen" } },
        boost = {
            motif = { "heraldic", "holy-symbol" },
            formality = { "common", "refined" },
            material = { "polished-stone", "carved-stone", "polished-wood", "stained-glass" },
            color = { "blue", "gold", "white", "silver" },
            mood = { "royal", "scholarly", "holy" },
        },
        anti = {
            culture = { "orc", "troll", "tauren", "forsaken", "goblin", "blood-elf", "zandalari", "vulpera" },
            motif = { "skull-bone", "tribal" },
            mood = { "primitive" },
        },
        subcategories = {
            { key = "furniture", label = "Furniture",
              query = { category = { "seating", "table", "bed", "storage" } } },
            { key = "art",       label = "Art & Banners",
              query = { category = { "wall-art", "textile", "statue", "trophy" } } },
            { key = "fixtures",  label = "Fixtures",
              query = { category = { "lighting", "utility", "container", "misc" } } },
            { key = "nature",    label = "Crafts & Nature",
              query = { category = { "book-scroll", "tool", "plant", "rug", "musical" } } },
        },
    },

    ["horde"] = {
        displayName = "Horde",
        icon = "Interface\\Icons\\Inv_BannerPVP_01",
        tier = "faction",
        color = { r = 0.8, g = 0.2, b = 0.2 },
        description = "Spikes on everything, red banners over iron gates, and the drumbeat of a war machine that never sleeps. From Orgrimmar's steel towers to Zandalar's golden pyramids, strength is the only currency.",
        minScore = 1.0,
        query = { culture = { "orc", "troll", "tauren", "forsaken", "goblin", "blood-elf", "zandalari", "vulpera" } },
        boost = {
            motif = { "tribal", "skull-bone", "dragon" },
            formality = { "crude", "humble", "common" },
            material = { "wrought-iron", "rough-wood", "bone-horn", "leather" },
            color = { "red", "dark-red", "black", "bronze" },
            mood = { "military", "primitive", "gothic" },
        },
        anti = {
            culture = { "human", "dwarf", "gnome", "night-elf", "draenei", "worgen" },
            motif = { "heraldic", "holy-symbol" },
            mood = { "scholarly" },
        },
        subcategories = {
            { key = "furniture", label = "Furniture",
              query = { category = { "seating", "table", "bed", "storage" } } },
            { key = "art",       label = "Art & Banners",
              query = { category = { "wall-art", "textile", "statue", "trophy" } } },
            { key = "fixtures",  label = "Fixtures",
              query = { category = { "lighting", "utility", "container", "misc" } } },
            { key = "arms",      label = "Arms & Relics",
              query = { category = { "weapon-armor", "tool", "book-scroll", "rug", "plant" } } },
        },
    },
}

-- Ordered list for UI display (controls card rendering order)
HDG_StyleOrder = {
    -- Room Concepts
    "rustic-tavern", "cozy-cottage", "arcane-study",
    "feast-hall", "workshop", "sacred-shrine",
    "garden-retreat", "war-camp", "seafarers-haven", "dark-sanctum",
    -- Themed
    "witchs-den", "tribal-lodge",
    -- Faction
    "alliance", "horde",
}

-- Tier display names and order
HDG_StyleTiers = {
    { key = "thematic",  name = "Room Concepts" },
    { key = "themed",    name = "Themed" },
    { key = "faction",   name = "Faction" },
    { key = "custom",    name = "My Styles" },
}
