/* Memolio: sample maker for blog posts (14 Sep 2026, session: blog-restyle-flickthrough).
   Same form and flow as the homepage "Try It Live" section, scoped under .sample-maker so
   it cannot collide with post styles. Markup is written into each post by
   gtm/blog-system/restyle_posts.py; behaviour lives in /js/sample-maker.js. */
.sample-maker { position: relative; z-index: 1; padding: 64px 0 8px; }
.sample-maker .sm-container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.sample-maker .sm-header { text-align: center; margin-bottom: 30px; }
.sample-maker .sm-label { font-family: 'Quicksand', sans-serif; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 10px; }
.sample-maker .sm-title { font-family: 'Crimson Pro', serif; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; color: var(--deep-brown); margin: 0; padding: 0; border: none; line-height: 1.2; }
.sample-maker .sm-title::after { display: none; }
.sample-maker .sm-intro { max-width: 640px; margin: 14px auto 0; font-size: 1.02rem; line-height: 1.7; color: var(--text-secondary); }

.sample-maker .try-it-panel { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.9fr); gap: 36px; max-width: 980px; margin: 0 auto; background: var(--warm-white); border-radius: 18px; box-shadow: 0 22px 55px rgba(139, 115, 85, 0.22), 0 4px 10px rgba(139, 115, 85, 0.08); padding: 34px; border: 1px solid rgba(139, 115, 85, 0.12); }

/* Form */
.sample-maker .try-it-form { display: flex; flex-direction: column; gap: 16px; }
.sample-maker .dropzone { position: relative; border: 2px dashed rgba(139, 115, 85, 0.35); border-radius: 14px; background: var(--paper); padding: 24px 20px; text-align: center; cursor: pointer; transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease; min-height: 150px; display: flex; align-items: center; justify-content: center; }
.sample-maker .dropzone:hover, .sample-maker .dropzone.drag-over { border-color: var(--terracotta); background: #FAF1E4; }
.sample-maker .dropzone.drag-over { transform: scale(1.01); }
.sample-maker .dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.sample-maker .dropzone-icon { width: 40px; height: 40px; color: var(--terracotta); opacity: 0.85; margin-bottom: 4px; }
.sample-maker .dropzone-title { font-family: 'Crimson Pro', serif; font-size: 1.25rem; font-weight: 600; color: var(--deep-brown); margin: 0; }
.sample-maker .dropzone-sub { font-size: 0.9rem; color: var(--text-secondary); margin: 0; }
.sample-maker .dropzone-filled { position: relative; width: 100%; align-items: center; justify-content: center; }
.sample-maker .dropzone-filled:not([hidden]) { display: flex; }
.sample-maker .dropzone-filled img { max-height: 210px; max-width: 100%; border-radius: 8px; box-shadow: 0 8px 22px rgba(139, 115, 85, 0.25); border: 3px solid var(--warm-white); }
.sample-maker .photo-replace { position: absolute; bottom: 8px; right: 8px; background: rgba(255, 253, 248, 0.95); border: 1px solid rgba(139, 115, 85, 0.25); color: var(--deep-brown); font-family: 'Quicksand', sans-serif; font-size: 0.78rem; font-weight: 600; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.sample-maker .photo-replace:hover { color: var(--terracotta); border-color: var(--terracotta); }

.sample-maker .form-field, .sample-maker .memory-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; margin: 0; }
.sample-maker .form-label, .sample-maker .memory-label { font-family: 'Quicksand', sans-serif; font-weight: 600; color: var(--deep-brown); font-size: 0.92rem; }
.sample-maker .form-label em, .sample-maker .memory-label em { font-style: normal; font-weight: 400; color: var(--text-secondary); font-size: 0.82rem; margin-left: 4px; }
.sample-maker .memory-helper { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.45; }
.sample-maker input[type="text"], .sample-maker input[type="email"], .sample-maker select, .sample-maker textarea { font-family: 'Quicksand', sans-serif; font-size: 0.95rem; color: var(--text-primary); background-color: var(--paper); border: 1px solid rgba(139, 115, 85, 0.25); border-radius: 10px; padding: 11px 14px; width: 100%; transition: border-color 0.25s ease, background-color 0.25s ease; }
.sample-maker textarea { line-height: 1.55; resize: vertical; min-height: 72px; padding-bottom: 28px; }
.sample-maker input:focus, .sample-maker select:focus, .sample-maker textarea:focus { outline: none; border-color: var(--terracotta); background-color: var(--warm-white); }
.sample-maker input::placeholder, .sample-maker textarea::placeholder { color: rgba(107, 93, 77, 0.55); }
.sample-maker select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236B5D4D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; cursor: pointer; }
.sample-maker select:invalid { color: rgba(107, 93, 77, 0.55); }
.sample-maker .memory-count { position: absolute; bottom: 10px; right: 12px; font-size: 0.75rem; color: var(--text-secondary); opacity: 0.7; pointer-events: none; background: var(--warm-white); padding: 2px 6px; border-radius: 4px; }

.sample-maker .form-row-split { display: grid; grid-template-columns: minmax(0, 1.1fr) auto; gap: 14px; }
.sample-maker .gender-pills { display: flex; gap: 6px; background: var(--paper); border-radius: 10px; padding: 4px; border: 1px solid rgba(139, 115, 85, 0.25); }
.sample-maker .gender-pill { flex: 1; background: transparent; border: none; padding: 8px 12px; font-family: 'Quicksand', sans-serif; font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); border-radius: 7px; cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease; }
.sample-maker .gender-pill:hover { color: var(--deep-brown); }
.sample-maker .gender-pill[aria-checked="true"] { background: var(--terracotta); color: var(--warm-white); box-shadow: 0 2px 6px rgba(193, 123, 93, 0.3); }

.sample-maker .try-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; line-height: 1.45; color: var(--text-secondary); background: rgba(239, 230, 213, 0.5); padding: 10px 12px; border-radius: 8px; cursor: pointer; margin: 0; }
.sample-maker .try-consent input { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--terracotta); cursor: pointer; }
.sample-maker .try-consent em { font-style: normal; opacity: 0.75; }

.sample-maker .try-generate { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 24px; background: var(--terracotta); color: var(--warm-white); font-family: 'Quicksand', sans-serif; font-size: 1rem; font-weight: 700; border: none; border-radius: 30px; cursor: pointer; box-shadow: 0 6px 18px rgba(193, 123, 93, 0.35); transition: background 0.25s ease, transform 0.2s ease, opacity 0.2s ease; }
.sample-maker .try-generate:not(:disabled):hover { background: var(--terracotta-dark); transform: translateY(-2px); }
.sample-maker .try-generate:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.sample-maker .try-disclaimer { font-size: 0.8rem; color: var(--text-secondary); text-align: center; opacity: 0.85; margin: 0; line-height: 1.5; }
.sample-maker .try-disclaimer a { color: var(--terracotta); text-decoration: underline; }
.sample-maker .try-error { background: rgba(193, 83, 83, 0.1); border-left: 3px solid #C15353; color: #7C3030; padding: 10px 12px; border-radius: 6px; font-size: 0.88rem; line-height: 1.45; margin: 0; }

/* Stage */
.sample-maker .try-it-stage { position: sticky; top: 96px; align-self: start; background: var(--paper); border-radius: 14px; min-height: 420px; display: flex; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.sample-maker .stage-empty, .sample-maker .stage-generating, .sample-maker .stage-sent { display: none; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.sample-maker .try-it-stage[data-state="empty"] .stage-empty,
.sample-maker .try-it-stage[data-state="generating"] .stage-generating,
.sample-maker .try-it-stage[data-state="sent"] .stage-sent { display: flex; }
.sample-maker .stage-example { width: 150px; height: auto; border-radius: 6px; box-shadow: 0 12px 28px rgba(139, 115, 85, 0.3); transform: rotate(-2deg); margin-bottom: 8px; }
.sample-maker .stage-empty-title { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 1.3rem; color: var(--soft-brown); margin: 0; line-height: 1.3; }
.sample-maker .stage-empty-sub { font-size: 0.92rem; color: var(--text-secondary); margin: 0; }
.sample-maker .stage-status { font-weight: 600; color: var(--deep-brown); margin: 0; }
.sample-maker .stage-bar { width: 100%; max-width: 280px; height: 4px; background: rgba(139, 115, 85, 0.15); border-radius: 3px; overflow: hidden; }
.sample-maker .stage-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--terracotta), var(--terracotta-dark)); border-radius: 3px; transition: width 0.4s linear; }
.sample-maker .stage-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta); animation: smPulse 1.4s ease-in-out infinite; }
@keyframes smPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.sample-maker .stage-sent-icon { width: 56px; height: 56px; border-radius: 50%; background: #E8F0EA; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.sample-maker .stage-sent-icon svg { width: 28px; height: 28px; color: #5B7C65; }
.sample-maker .stage-sent-title { font-family: 'Crimson Pro', serif; font-size: 1.45rem; font-weight: 600; line-height: 1.25; color: var(--deep-brown); margin: 0; }
.sample-maker .stage-sent-sub { font-size: 0.96rem; color: var(--text-secondary); line-height: 1.6; max-width: 380px; margin: 0 0 10px; }
.sample-maker .stage-sent-email { font-weight: 700; color: var(--deep-brown); }
.sample-maker .done-primary { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; background: var(--terracotta); color: var(--warm-white); font-weight: 700; font-size: 0.96rem; border-radius: 30px; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(193, 123, 93, 0.35); transition: background 0.25s ease, transform 0.2s ease; }
.sample-maker .done-primary:hover { background: var(--terracotta-dark); color: var(--warm-white); text-decoration: none; transform: translateY(-2px); }

@media (max-width: 820px) {
    .sample-maker .try-it-panel { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
    .sample-maker .try-it-stage { position: relative; top: auto; min-height: 0; padding: 22px; }
    /* Phones: the form comes first, so the example picture would only sit below the button. Show the stage once something happens. */
    .sample-maker .try-it-stage[data-state="empty"] { display: none; }
}
@media (max-width: 520px) {
    .sample-maker { padding-top: 44px; }
    .sample-maker .sm-container { padding: 0 12px; }
    .sample-maker .try-it-panel { padding: 16px; }
    .sample-maker .form-row-split { grid-template-columns: 1fr; gap: 12px; }
    .sample-maker .dropzone { min-height: 110px; padding: 16px; }
    .sample-maker textarea { min-height: 52px; }
}
