/* ============================================
   HOTCUISINE.CSS - CharmsBot Hot Cuisine Calculator
   Matching Official Homepage Feature Cards Theme
   ============================================ */

.hc-container {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(123, 44, 191, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    margin: 0 auto;
}

.hc-container .header {
    background: linear-gradient(180deg, rgba(123, 44, 191, 0.25) 0%, rgba(20, 20, 20, 0.6) 100%);
    padding: 28px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(123, 44, 191, 0.3);
}

.hc-container .header h1 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    margin: 0 auto 8px auto;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #00d4ff, #9d4edd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hc-container .header p, #headerSubtitle {
    color: #b0b0b0;
    margin: 4px auto 0 auto;
    font-size: 14px;
    text-align: center !important;
    display: block;
    width: 100%;
}

.recipes-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0;
}

@media (max-width: 900px) {
    .recipes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .recipes-list {
        grid-template-columns: 1fr;
    }
}

.recipe-item {
    display: flex;
    align-items: center;
    background: rgba(35, 35, 40, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    gap: 10px;
    border: 1px solid rgba(123, 44, 191, 0.15);
}

.recipe-item:hover {
    background: rgba(123, 44, 191, 0.18);
    border-color: rgba(123, 44, 191, 0.45);
    transform: translateY(-2px);
}

.recipe-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.recipe-name {
    flex: 1;
    font-size: 13px;
    color: #d0d0d0;
    font-weight: 500;
}

.recipe-qty {
    font-size: 12px;
    font-weight: 700;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 15px auto 0 auto;
    width: calc(100% - 30px);
}

.grid-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.city-section {
    background: rgba(22, 22, 25, 0.6);
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 12px;
    padding: 15px 0;
    width: 100%;
    transition: all 0.3s ease;
}

.city-section:hover {
    border-color: rgba(123, 44, 191, 0.5);
}

.city-title {
    font-family: 'Cinzel', serif;
    color: #00d4ff;
    font-size: 16px;
    margin: 0 15px 10px 15px;
    border-bottom: 1px solid rgba(123, 44, 191, 0.2);
    padding-bottom: 8px;
}

.edron-cols > div {
    break-inside: avoid;
}

.npc-title {
    color: #c77dff;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 15px 15px 8px 15px;
}

.ingredient-list {
    list-style: none;
    padding: 0 15px;
    margin: 0;
    /* Laid out by target COLUMN WIDTH, not a column count: the browser fits as many
       ~290px columns as the space allows. That resolves every case on its own — one
       column inside a normal third of a city row, two inside two thirds, three across
       a full-width row, and one again on a phone — with no breakpoint arithmetic in the
       JS, and no single item ever stretched across the full page.

       290px is picked so all four land right. The column count is
       floor((available + gap) / (width + gap)) against content widths of roughly 288,
       616, 956 and 370px; at 330px a full-width row only fits two columns, which made
       Market's rows visibly wider than Edron's. */
    columns: 290px;
    column-gap: 15px;
}

.ingredient-list > .ingredient-item {
    break-inside: avoid;
}

.ingredient-item {
    display: flex;
    align-items: center;
    background: rgba(35, 35, 40, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.ingredient-item:hover {
    background: rgba(123, 44, 191, 0.18);
    border-color: rgba(123, 44, 191, 0.45);
}

.item-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    object-fit: none;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.8));
}

.item-info {
    flex-grow: 1;
}

.item-name {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 14px;
}

.item-name-link {
    color: inherit;
    text-decoration: none;
}

.item-name-link:hover .item-name {
    text-decoration: underline;
    color: #00d4ff;
}

.npc-title-link {
    color: #0000EE;
    text-decoration: none;
}

.npc-title-link:hover {
    text-decoration: underline;
    color: #3366ff;
}

.item-qty {
    color: #00d4ff;
    font-weight: bold;
    font-size: 14px;
    background: rgba(123, 44, 191, 0.2);
    border: 1px solid rgba(123, 44, 191, 0.35);
    padding: 3px 10px;
    border-radius: 6px;
}

.item-note {
    font-size: 11px;
    color: #b0b0b0;
    display: block;
    margin-top: 2px;
}

.item-note a {
    color: #00d4ff;
    text-decoration: none;
}

.item-note a:hover {
    text-decoration: underline;
}

.edron-cols {
    columns: 3;
    column-gap: 15px;
    padding: 0 15px 15px 15px;
}

.edron-cols > div {
    break-inside: avoid;
    margin-bottom: 15px;
    display: inline-block;
    width: 100%;
}

@media (max-width: 900px) {
    .edron-cols {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .edron-cols {
        columns: 1;
    }
}

/* City cards stack at full width in normal document flow. This replaced a JS masonry
   that absolutely-positioned variable-width cards into three columns: because a card's
   position was computed from every other card's height, checking off one NPC could
   send unrelated cards jumping to a different column, and you lost the city you were
   working through. Nothing is positioned by JS now, so a collapse only shifts what is
   below it and no card ever moves sideways. */
.cities-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.cities-stack .city-section {
    margin: 0;
    width: 100%;
}

/* The three columns inside a city. Cities with fewer than three NPCs give the spare
   columns to their longest lists (see layoutCityBody) via flex-grow, so the card is
   still full width without leaving dead space on the right. */
.city-cols {
    display: flex;
    gap: 15px;
    width: 100%;
    align-items: flex-start;
}

.city-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .city-cols {
        flex-wrap: wrap;
    }
    .city-col {
        flex-basis: calc(50% - 8px);
    }
}

@media (max-width: 600px) {
    .city-cols {
        flex-direction: column;
    }
    .city-col {
        flex-basis: auto;
        width: 100%;
    }
}

/* ---- Ingredient checkboxes & collapse states ---- */
.ingredient-check {
    width: 16px;
    height: 16px;
    min-width: 16px;
    cursor: pointer;
    accent-color: #7b2cbf;
}

.ingredient-item.checked-item {
    opacity: 0.45;
}

.ingredient-item.checked-item .item-name {
    text-decoration: line-through;
    color: #888;
}

.ingredient-item.checked-item .item-icon {
    filter: grayscale(1) drop-shadow(1px 1px 2px rgba(0,0,0,0.8));
}

.ingredient-item.checked-item .item-qty {
    color: #888;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.npc-title, .city-title {
    cursor: pointer;
    user-select: none;
}

.npc-group.collapsed .ingredient-list {
    display: none;
}

.npc-group.collapsed .npc-title {
    opacity: 0.6;
}

.city-section.collapsed .city-body {
    display: none;
}

.city-section.collapsed .city-title {
    opacity: 0.75;
}

.section-check {
    display: none;
    margin-left: 6px;
    color: #4ade80;
}

.collapsed .section-check {
    display: inline;
}

/* Dish checkmark: intentionally NOT greyed/dimmed, just an added checkmark badge. */
/* Kept in the layout rather than removed from it, so the icons and names stay in
   a straight column and no row shifts sideways the moment a dish is completed. */
.recipe-check {
    visibility: hidden;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
    color: #4ade80;
    font-weight: 700;
    font-size: 15px;
}

.recipe-item.recipe-done .recipe-check {
    visibility: visible;
}

/* A marked row means one extra serving in first-time mode and an included dish
   in custom mode; the quantity badge says how many, the highlight says it was
   picked by hand. */
.recipe-item {
    cursor: pointer;
    user-select: none;
}

.recipe-item.marked {
    background: rgba(123, 44, 191, 0.25);
    border-color: rgba(123, 44, 191, 0.6);
    box-shadow: 0 0 8px rgba(123, 44, 191, 0.2);
}

.recipe-item.marked .item-name {
    color: #e9e0ff;
}

/* Custom mode with the dish left unmarked: it is not being cooked, so the row
   recedes and loses its badge instead of disappearing and moving the others. */
.recipe-item.inactive {
    opacity: 0.5;
}

.recipe-item.inactive .recipe-icon {
    filter: grayscale(0.7);
}

.calc-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #8a79ad;
    text-align: center;
}

/* Footer links (Tibia / CipSoft GmbH) — match the gold/yellow theme used on the
   rest of the site instead of falling back to the browser's default blue link color. */
.footer-link {
    color: #ffd700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #ffed4e;
    text-decoration: underline;
}

/* ============================================
   CALCULATOR PANEL — Interactive Controls
   ============================================ */
.calculator-panel {
    background: rgba(22, 22, 25, 0.6);
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 15px auto 0 auto;
    width: calc(100% - 30px);
}

.calc-section {
    margin-bottom: 16px;
}

.calc-section:last-child {
    margin-bottom: 0;
}

.calc-label {
    display: block;
    color: #c77dff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ---- Mode Tabs ---- */
.mode-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mode-tab {
    flex: 1;
    min-width: 180px;
    padding: 10px 16px;
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 8px;
    background: rgba(35, 35, 40, 0.5);
    color: #b0b0b0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.mode-tab:hover {
    background: rgba(123, 44, 191, 0.18);
    border-color: rgba(123, 44, 191, 0.5);
    color: #e0e0e0;
}

.mode-tab.active {
    background: rgba(123, 44, 191, 0.3);
    border-color: rgba(123, 44, 191, 0.7);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(123, 44, 191, 0.25);
}

/* ---- Character Counter ---- */
.char-counter {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 180px;
}

.char-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(123, 44, 191, 0.4);
    background: rgba(35, 35, 40, 0.7);
    color: #e0e0e0;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.char-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.char-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.char-btn:hover {
    background: rgba(123, 44, 191, 0.35);
    border-color: rgba(123, 44, 191, 0.7);
}

.char-btn:active {
    background: rgba(123, 44, 191, 0.5);
    transform: scale(0.95);
}

.char-input {
    width: 60px;
    height: 40px;
    border: 1px solid rgba(123, 44, 191, 0.4);
    border-left: none;
    border-right: none;
    background: rgba(20, 20, 24, 0.8);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.char-input::-webkit-outer-spin-button,
.char-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.char-input:focus {
    border-color: rgba(123, 44, 191, 0.7);
    box-shadow: 0 0 8px rgba(123, 44, 191, 0.2);
}

/* ---- Action Bar ---- */
.action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(123, 44, 191, 0.2);
}

.action-btn {
    flex: 1;
    min-width: 160px;
    padding: 10px 16px;
    border: 1px solid rgba(123, 44, 191, 0.3);
    border-radius: 8px;
    background: rgba(35, 35, 40, 0.5);
    color: #d0d0d0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(123, 44, 191, 0.2);
    border-color: rgba(123, 44, 191, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

.action-copy:hover {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.15);
}

.action-reset:hover {
    border-color: rgba(255, 165, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.15);
}

.action-discord {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.4);
}

.action-discord:hover {
    background: rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.7);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.2);
}

/* ---- Toast Notification ---- */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(30, 30, 35, 0.95);
    border: 1px solid rgba(123, 44, 191, 0.5);
    color: #e0e0e0;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(123, 44, 191, 0.2);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 600px) {
    .mode-tabs {
        flex-direction: column;
    }
    .mode-tab {
        min-width: auto;
    }
    .action-bar {
        flex-direction: column;
    }
    .action-btn {
        min-width: auto;
    }
}

