/* All rules are scoped under #christmas-card so this component can be dropped into any
   host page without leaking styles (no :root, html, body, or bare * selectors). */
#christmas-card {
    --razer-green: #44D62C;
    --razer-green-dim: #2fa71e;
    --bg: #000;
    --text: #fff;
    --muted: #cfcfcf;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 6.25rem;
    background: var(--bg);
    color: var(--text);
    font-family: Roboto, Arial, sans-serif;
    box-sizing: border-box;
}
#christmas-card *,
#christmas-card *::before,
#christmas-card *::after { box-sizing: border-box; }
#christmas-card .hero {
  text-align: center;
   margin-bottom: 36px;
		position: relative;
		top:0; left: 0;
}
#christmas-card .hero h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);   
    font-weight: 700;
			color: #fff;
}
#christmas-card .hero p {
    margin: 0;
    color: var(--muted);
		font-size: 14px;
		color: #fff;
		font: normal 1.125rem / 1.5rem Roboto;
   color: #9a9a9a;
}
#christmas-card .hero p strong {color: #fff; font-weight: 400;}
#christmas-card .builder {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
@media (max-width: 900px) {
    #christmas-card .builder { grid-template-columns: 1fr; }
}
/* ---- Preview (left side) ---- */
#christmas-card .label {
    color: var(--muted);
    margin: 0 0 12px;
    font-size: 14px;
			color: #fff;
}
#christmas-card .canvas-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 3px solid var(--razer-green);
    background: #000;
    overflow: hidden;
    user-select: none;
}
#christmas-card #cardCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}
#christmas-card .stage {
    position: absolute;
    inset: 0;
}
#christmas-card .hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    pointer-events: none;
    text-align: center;
    padding: 20px;
}
#christmas-card .sticker {
    position: absolute;
    width: 72px;
    height: 72px;
    cursor: grab;
    transform: translate(-50%, -50%);
    touch-action: none;
}
#christmas-card .sticker.dragging { cursor: grabbing; }
#christmas-card .sticker svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}
#christmas-card .sticker .remove { display: none; }
#christmas-card .text-sticker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    font-weight: 700;
    /* `pre` preserves user-entered newlines without auto-wrapping long lines. */
    white-space: pre;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    padding: 4px 8px;
    touch-action: none;
}
/* ---- Controls (right side) ---- */
#christmas-card .controls { display: flex; flex-direction: column; gap: 24px; }
#christmas-card .step-title {
    margin: 0 0 12px;
    font-size: 15px;
		small {font-size: 10px; display: block; line-height: 14px;}
}
#christmas-card .bg-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
#christmas-card .bg-thumb {
    aspect-ratio: 16 / 9;
    border: 2px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    padding: 0;
    transition: transform .15s, border-color .15s;
}
#christmas-card .bg-thumb[data-bg="green"]  { background: #000 url("https://assets2.razerzone.com/images/cards/christmas-card-1.png") center/cover no-repeat; }
#christmas-card .bg-thumb[data-bg="cream"]  { background: #000 url("https://assets2.razerzone.com/images/cards/christmas-card-2.png") center/cover no-repeat; }
#christmas-card .bg-thumb[data-bg="silver"] { background: #000 url("https://assets2.razerzone.com/images/cards/christmas-card-3.png") center/cover no-repeat; }
#christmas-card .bg-thumb:hover    { transform: translateY(-2px); }
#christmas-card .bg-thumb.active   { border-color: var(--razer-green); box-shadow: 0 0 0 2px rgba(68,214,44,0.25); }
#christmas-card .icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
#christmas-card .icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--razer-green);
    background: transparent;
    color: var(--razer-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s, background .15s, color .15s;
    padding: 0;
}
#christmas-card .icon-btn:hover {
    background: var(--razer-green);
    color: #000;
    transform: translateY(-2px);
}
#christmas-card .icon-btn svg { width: 45px; height: 45px; }
#christmas-card .icon-btn:first-child svg,
#christmas-card .icon-btn:last-child svg { width: 30px; height: 30px; }
#christmas-card #personalText {
    width: 100%;
    background: transparent;
    border: 2px solid var(--razer-green);
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
    font-style: italic;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
}
#christmas-card #personalText::placeholder { color: #8f8f8f; font-style: italic; }
#christmas-card #personalText::placeholder {content: "123"}
#christmas-card .download-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--razer-green);
    background: transparent;
    color: var(--razer-green);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, background .15s, color .15s;
    padding: 0;
}
#christmas-card .download-btn:hover {
    background: var(--razer-green);
    color: #000;
    transform: translateY(-2px);
}
@media (max-width: 768px) {
	#christmas-card {padding-bottom: 3rem;}
}
 @media screen and (max-width:767px){} @media screen and (-webkit-max-device-pixel-ratio: 1) and (min-width: 1200px), screen and (min-width: 768px) and (max-width: 1200px){} @media screen and (-webkit-min-device-pixel-ratio: 1) and (min-width: 1200px){} @media screen and (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 1200px){}