/**
 * Starby Polaroid — CSS.
 */

/* ========================================
   GENERATOR
   ======================================== */
.starby-pol-gen__step { display: none; }
.starby-pol-gen__step.is-active { display: block; }

.starby-pol-gen__header { text-align: center; margin-bottom: 40px; }
.starby-pol-gen__header h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 300; margin-bottom: 8px; }
.starby-pol-gen__header h2 em { font-style: italic; }
.starby-pol-gen__header p { font-size: 14px; opacity: 0.5; }

/* Upload */
.starby-pol-gen__upload {
	max-width: 500px; margin: 0 auto;
	border: 2px dashed rgba(190,170,118,0.2);
	border-radius: 12px; padding: 56px 32px;
	text-align: center; cursor: pointer;
	transition: all 0.3s;
}
.starby-pol-gen__upload:hover, .starby-pol-gen__upload.is-dragover {
	border-color: #BEAA76; background: rgba(190,170,118,0.04);
}
.starby-pol-gen__upload-icon { font-size: 40px; margin-bottom: 16px; display: block; }
.starby-pol-gen__upload h3 { font-size: 20px; font-weight: 400; margin-bottom: 8px; }
.starby-pol-gen__upload p { font-size: 14px; opacity: 0.4; }
.starby-pol-gen__upload-hint { font-size: 12px; opacity: 0.25; margin-top: 12px; }

/* Layout steg 2 */
.starby-pol-gen__layout {
	max-width: 900px; margin: 0 auto;
	display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start;
}
@media (max-width: 768px) { .starby-pol-gen__layout { grid-template-columns: 1fr; } }

/* Verktyg */
.starby-pol-gen__preview-img { border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.starby-pol-gen__preview-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; border-radius: 8px; }
.starby-pol-gen__change-btn { background: none; border: none; font-size: 13px; opacity: 0.4; cursor: pointer; margin-bottom: 24px; color: inherit; }

.starby-pol-gen__tool-section { margin-bottom: 24px; }
.starby-pol-gen__tool-label { font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; opacity: 0.5; margin-bottom: 12px; }

/* Stickers */
.starby-pol-gen__stickers { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.starby-pol-gen__sticker {
	aspect-ratio: 1; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.06);
	background: rgba(255,255,255,0.03); font-size: 22px; cursor: pointer;
	display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.starby-pol-gen__sticker:hover { transform: scale(1.1); border-color: #BEAA76; }
.starby-pol-gen__sticker.is-selected { border-color: #BEAA76; background: rgba(190,170,118,0.1); }
.starby-pol-gen__sticker--image { padding: 4px; }
.starby-pol-gen__sticker--image img { width: 100%; height: 100%; object-fit: contain; }

/* Bild-stickers på polaroiden */
.starby-pol-gen__pol-sticker--img { width: 36px; height: 36px; object-fit: contain; pointer-events: none; }

/* Draggable stickers */
.starby-pol-gen__pol-sticker--draggable {
	pointer-events: auto;
	font-size: 32px;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
	transition: box-shadow 0.2s;
	z-index: 5;
}
.starby-pol-gen__pol-sticker--draggable:hover {
	filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}
.starby-pol-gen__pol-sticker--draggable:active {
	z-index: 10;
}

/* Resize-handtag */
.starby-pol-gen__pol-resize {
	position: absolute;
	bottom: -6px; right: -6px;
	width: 18px; height: 18px;
	background: rgba(190,170,118,0.8);
	color: #162928;
	border-radius: 50%;
	font-size: 10px;
	display: flex; align-items: center; justify-content: center;
	cursor: nwse-resize;
	opacity: 0;
	transition: opacity 0.2s;
	pointer-events: auto;
	line-height: 1;
}
.starby-pol-gen__pol-sticker--draggable:hover .starby-pol-gen__pol-resize {
	opacity: 1;
}

/* Ramfärger */
.starby-pol-gen__frames { display: flex; gap: 10px; }
.starby-pol-gen__frame {
	width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
	border: 3px solid transparent; transition: all 0.2s;
}
.starby-pol-gen__frame:hover { transform: scale(1.1); }
.starby-pol-gen__frame.is-selected { border-color: #BEAA76; }

/* Caption input */
.starby-pol-gen__caption-input {
	width: 100%; padding: 12px 14px; border-radius: 8px;
	background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
	font-size: 20px;
	color: inherit; outline: none; transition: border-color 0.3s;
}
.starby-pol-gen__caption-input:focus { border-color: #BEAA76; }
.starby-pol-gen__caption-input::placeholder { opacity: 0.25; }
.starby-pol-gen__char-count { font-size: 11px; opacity: 0.2; text-align: right; display: block; margin-top: 4px; }

/* Polaroid-förhandsgranskning */
.starby-pol-gen__preview-panel { position: sticky; top: 100px; }
.starby-pol-gen__preview-label { font-size: 11px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; opacity: 0.3; text-align: center; margin-bottom: 16px; }

.starby-pol-gen__polaroid {
	background: #F2EDD9; padding: 10px 10px 0; border-radius: 3px;
	box-shadow: 4px 8px 24px rgba(0,0,0,0.2);
	transform: rotate(-2deg); transition: transform 0.4s;
}
.starby-pol-gen__polaroid:hover { transform: rotate(0deg); }

.starby-pol-gen__polaroid-img {
	position: relative; overflow: hidden; border-radius: 2px;
	background: rgba(48,78,77,0.1); aspect-ratio: 1;
}
.starby-pol-gen__polaroid-img img { width: 100%; height: 100%; object-fit: cover; }

.starby-pol-gen__polaroid-bottom { padding: 10px 8px 16px; }
.starby-pol-gen__polaroid-caption {
	font-size: 20px;
	color: #304E4D; text-align: center; display: block; min-height: 28px;
}
.starby-pol-gen__polaroid-meta {
	display: flex; justify-content: space-between; margin-top: 8px;
	font-size: 9px; color: #A89D88; letter-spacing: 1px; text-transform: uppercase;
}

/* Stickers på polaroiden */
.starby-pol-gen__pol-sticker {
	position: absolute; font-size: 28px; pointer-events: none;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Knappar */
.starby-pol-gen__actions { display: flex; gap: 10px; margin-top: 20px; }
.starby-pol-gen__btn-publish {
	flex: 1; background: #B85A3A; color: #fff;
	font-size: 13px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
	padding: 14px 0; border: none; border-radius: 25px; cursor: pointer; transition: background 0.3s;
}
.starby-pol-gen__btn-publish:hover { background: #a04e2e; }
.starby-pol-gen__btn-download {
	flex: 1; background: transparent; color: inherit;
	font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
	padding: 13px 0; border: 1px solid rgba(255,255,255,0.1); border-radius: 25px;
	cursor: pointer; transition: border-color 0.3s;
}
.starby-pol-gen__btn-download:hover { border-color: rgba(255,255,255,0.3); }

.starby-pol-gen__info { text-align: center; margin-top: 16px; font-size: 12px; opacity: 0.3; }

/* Klart */
.starby-pol-gen__done { text-align: center; padding: 80px 24px; }
.starby-pol-gen__done-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.starby-pol-gen__done h2 { font-size: 32px; font-weight: 300; margin-bottom: 12px; }
.starby-pol-gen__done p { font-size: 15px; opacity: 0.5; margin-bottom: 32px; max-width: 400px; margin-left: auto; margin-right: auto; }
.starby-pol-gen__btn-restart {
	background: transparent; color: inherit; font-size: 14px;
	border: 1px solid rgba(255,255,255,0.15); padding: 12px 32px;
	border-radius: 25px; cursor: pointer;
}

/* ========================================
   GALLERI (shortcode-version)
   ======================================== */
.starby-pol-gallery__grid { column-gap: 20px; }
.starby-pol-card {
	break-inside: avoid; margin-bottom: 20px;
	background: #F2EDD9; padding: 8px 8px 0;
	border-radius: 3px; box-shadow: 2px 4px 16px rgba(0,0,0,0.12);
	transition: transform 0.4s, box-shadow 0.4s; cursor: pointer;
}
.starby-pol-card:hover { transform: rotate(0deg) scale(1.03) !important; box-shadow: 4px 8px 32px rgba(0,0,0,0.2); z-index: 2; position: relative; }
.starby-pol-gallery--rotated .starby-pol-card:nth-child(odd) { transform: rotate(-1.2deg); }
.starby-pol-gallery--rotated .starby-pol-card:nth-child(even) { transform: rotate(0.8deg); }
.starby-pol-card__img-wrap { position: relative; overflow: hidden; border-radius: 2px; }
.starby-pol-card__img-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.starby-pol-card__sticker { position: absolute; font-size: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); pointer-events: none; }
.starby-pol-card__sticker--0 { top: 8%; left: 8%; transform: rotate(-12deg); }
.starby-pol-card__sticker--1 { top: 6%; right: 10%; transform: rotate(8deg); }
.starby-pol-card__sticker--2 { bottom: 12%; right: 8%; transform: rotate(-5deg); }
.starby-pol-card__caption { padding: 12px 8px 16px; font-size: 16px; color: #304E4D; text-align: center; }
.starby-pol-gallery__empty { text-align: center; padding: 48px; opacity: 0.4; font-style: italic; }
