/*
    MerchStudio version 0.08 - Brand CSS File (143transfers)
    Copyright (c) 2026 MerchStudio Inc.
    Per-Image Transfers Client Styles
    @author      Hezekiah Dayson / Full Stack SWE
    @version     tpl/brand/client/css/pix.css - 0.08 - 2026-09-02 - merchstudio

    #included-by: client/css_load.tpl
*/

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;600;700&display=swap');

/* --- Brand Background Setup (Solid Theme Default) --- */
.pix_wrap,
#gang_sheet_app {
    background-color: var(--bg);
    min-height: calc(100vh - 70px);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* --- Brand Title & Headlines --- */
.app_title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    margin: 0;
    color: var(--highlight);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.staging_toolbar h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

/* --- Tightened Hero & Vertical Spacing --- */
.upload_hero {
    min-height: auto;
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload_card {
    background-color: var(--base);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 30px;
    max-width: 550px;
    box-shadow: var(--shadow);
}

/* --- Upload Card Typography (Inter) --- */
.upload_card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text);
    margin-top: 15px;
    margin-bottom: 8px;
}

.upload_card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    line-height: 1.6;
    color: var(--contrast);
    margin-bottom: 20px;
}

.staging_section {
    margin-top: 10px;
    padding-bottom: 60px;
}

/* --- Pix Grid & Stage Cards --- */
.staging_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stage_card {
    background-color: var(--base);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px var(--shadow);
    overflow: hidden;
}

/* --- Thumbnail Preview Container --- */
.card_preview {
    position: relative;
    height: 200px;
    border-radius: 8px;
    border: 1px solid var(--line);
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--info_bg);
}

.card_preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 1;
    display: block;
}

/* --- Absolute Badges --- */
.pix_badge_price {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--highlight);
    color: #111;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

.pix_badge_delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--accent_red, #e74c3c);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s ease;
}

.pix_badge_delete:hover {
    transform: scale(1.1);
}

.pix_badge_delete .merch_icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: currentColor;
}

.pix_badge_dpi {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.pix_badge_dpi.good {
    color: var(--accent_green, #2ecc71);
}

/* --- Body Text, Form Labels & Buttons (Inter Only) --- */
.subtle_text,
.card_meta,
.card_dims label,
.qty_label,
.merch_button,
button {
    font-family: 'Inter', sans-serif;
}

.card_meta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--contrast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1rem;
    text-align: center;
}

.card_dims.inline_input {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 1rem;
}

.card_dims .dim_input {
    flex: 1;
}

.card_dims .dim_input label {
    font-size: 10px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    color: var(--text);
}

/* Defensively Specifying 'input.pix_input_field' blocks common.css clashes */
input.pix_input_field {
    width: 100%;
    background-color: var(--info_bg);
    border: 1px solid var(--line);
    color: var(--contrast);
    padding: 6px 8px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    height: auto;
    text-align: center;
    box-sizing: border-box;
}

input.pix_input_field:focus {
    outline: none;
    border-color: var(--highlight);
}

/* --- Quantity Controls --- */
.qty_label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card_qty {
    display: flex;
    align-items: stretch;
    background-color: var(--info_bg);
    border-radius: 6px;
    border: 1px solid var(--line);
    overflow: hidden;
    margin-bottom: 1rem;
    height: 40px;
    width: 100%;
    box-sizing: border-box;
}

.card_qty .merch_button {
    background: transparent;
    color: var(--contrast);
    border: none;
    min-width: 45px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: background 0.2s;
}

.card_qty .merch_button:hover {
    background-color: var(--hover);
}

input.qty_val:focus {
    background: var(--hover, #222);
}

/* Defensively Specifying 'input.qty_val' blocks common.css clashes */
input.qty_val {
    flex: 1;
    width: 0;
    min-width: 40px;
    text-align: center;
    background: transparent;
    color: var(--contrast);
    border: none;
    outline: none;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    -moz-appearance: textfield;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

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

/* --- Pricing Totals --- */
.pix_per_ea {
    font-size: 0.75em;
    font-weight: 500;
    opacity: 0.9;
}

.pix_total_wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

.pix_total_price {
    color: var(--highlight);
    font-size: 1.15rem;
}

/* --- Primary Brand Action Buttons --- */
.pix_add_cart_btn {
    width: 100%;
    background-color: var(--highlight);
    color: #111;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease-in-out;
}

/* Subtle purple border and lift effect for yellow buttons */
.pix_add_cart_btn:hover:not(:disabled) {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.pix_add_cart_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- App Header & Layout Support --- */
.app_header {
    height: 70px;
    background-color: var(--bg);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
}

.header_left,
.header_right {
    display: flex;
    align-items: center;
}

.header_left {
    gap: 0;
}

.header_right {
    gap: 20px;
}

/* --- Empty State Styling --- */
.empty_stage {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background-color: var(--base);
}

.empty_stage.hidden {
    display: none;
}

/* Hide chat widget on PIX page */
.merch_chat_widget {
    display: none;
}

/* --- Bulk Action Buttons --- */
button#main_add_all,
button#fab_add_all {
    transition: all 0.2s ease-in-out;
    color: #111;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    border: 1px solid transparent;
}

button#main_add_all span,
button#fab_add_all span {
    color: #111;
}

button#main_add_all .merch_icon,
button#fab_add_all .merch_icon {
    fill: #111;
    stroke: #111;
    color: #111;
}

/* Hover effect for the Yellow Add All buttons (Subtle purple border) */
button#main_add_all:hover:not(:disabled),
button#fab_add_all:hover:not(:disabled) {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* --- Red Delete All Buttons - Video Accurate --- */
button#main_delete_all,
button#fab_delete_all {
    background-color: transparent;
    border: 1px solid var(--accent_red, #e74c3c);
    transition: all 0.2s ease-in-out;
}

button#main_delete_all span,
button#fab_delete_all span {
    color: var(--accent_red, #e74c3c);
    transition: all 0.2s ease-in-out;
}

button#main_delete_all .merch_icon,
button#fab_delete_all .merch_icon {
    fill: var(--accent_red, #e74c3c);
    stroke: var(--accent_red, #e74c3c);
    color: var(--accent_red, #e74c3c);
    transition: all 0.2s ease-in-out;
}

/* Turns the box and text white, keeps background transparent */
button#main_delete_all:hover:not(:disabled),
button#fab_delete_all:hover:not(:disabled) {
    background-color: transparent;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.1);
}

button#main_delete_all:hover:not(:disabled) span,
button#fab_delete_all:hover:not(:disabled) span {
    color: #fff;
}

button#main_delete_all:hover:not(:disabled) .merch_icon,
button#fab_delete_all:hover:not(:disabled) .merch_icon {
    fill: #fff;
    stroke: #fff;
    color: #fff;
}

/* --- Main Upload Button --- */
button#main_upload_btn {
    transition: all 0.2s ease-in-out;
    color: #111;
    border: 1px solid transparent;
}

button#main_upload_btn span {
    color: #111;
}

button#main_upload_btn .merch_icon {
    fill: #111;
    stroke: #111;
    color: #111;
}

/* Hover effect for the Main Upload button (Subtle purple border) */
button#main_upload_btn:hover:not(:disabled) {
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
/* --- Grid Upload Card (Translucent Add Box) --- */
.grid_upload_card {
    border: 2px dashed var(--line);
    border-radius: 12px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 350px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    color: var(--line);
    opacity: 0.6;
    box-sizing: border-box;
}

.grid_upload_card:hover {
    border-color: var(--highlight);
    color: var(--highlight);
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.03); /* Subtle translucent fill */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.grid_upload_card svg {
    margin-bottom: 15px;
}

.grid_upload_card span {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}