/* ── K Gallery — Newsletter popup ─────────────────────────────
   All selectors namespaced with .kgpop to avoid cascade leakage. */

.kgpop-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    opacity: 0; visibility: hidden;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.kgpop-overlay.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s ease; }

.kgpop {
    position: fixed; bottom: 32px; right: 32px;
    width: 380px; max-width: calc(100vw - 24px);
    max-height: calc(100vh - 48px); overflow-y: auto;
    background: #fff;
    z-index: 99999;
    box-shadow: 0 32px 80px rgba(0,0,0,0.22);
    transform: translateY(30px);
    opacity: 0; visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.5s ease, visibility 0s linear 0.5s;
    font-family: inherit; text-align: left;
}
.kgpop.is-open { transform: translateY(0); opacity: 1; visibility: visible; transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), opacity 0.5s ease; }
.kgpop *, .kgpop *::before, .kgpop *::after { box-sizing: border-box; }
.kgpop p { margin: 0; }

/* Turquoise band */
.kgpop-band { background: #0097A7; padding: 28px 28px 24px; position: relative; overflow: hidden; }
.kgpop-glow {
    position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.kgpop .kgpop-close {
    position: absolute; top: 12px; right: 14px; z-index: 10;
    width: 26px; height: 26px; padding: 0; margin: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2); color: #fff;
    border: none; border-radius: 50%; cursor: pointer;
    font-size: 13px; line-height: 1; transition: background 0.15s;
    box-shadow: none; text-transform: none; letter-spacing: 0;
}
.kgpop .kgpop-close:hover { background: rgba(255,255,255,0.35); }
.kgpop-tag { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 10px !important; position: relative; z-index: 1; }
.kgpop-headline { font-size: 22px; font-weight: 300; color: #fff; line-height: 1.25; letter-spacing: -0.01em; position: relative; z-index: 1; }
.kgpop-headline em { font-style: italic; color: rgba(255,255,255,0.75); }

/* Body */
.kgpop-body { padding: 28px 28px 24px; }
.kgpop-title { font-size: 15px; font-weight: 500; color: #111; margin-bottom: 4px !important; }
.kgpop-sub   { font-size: 12px; color: #999; line-height: 1.65; margin-bottom: 22px !important; }

.kgpop-field { margin-bottom: 16px; }
.kgpop-label { display: block; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: #b5b1aa; margin-bottom: 7px; }
.kgpop .kgpop-input,
.kgpop .kgpop-select {
    display: block; width: 100%; height: auto; margin: 0;
    padding: 9px 0; border: none; border-bottom: 0.5px solid #d9d4cc; border-radius: 0;
    background: transparent; box-shadow: none; outline: none;
    font-family: inherit; font-size: 13px; color: #111; transition: border-color 0.2s;
}
.kgpop .kgpop-input:focus,
.kgpop .kgpop-select:focus { border-bottom-color: #0097A7; box-shadow: none; }
.kgpop .kgpop-input::placeholder { color: #c9c5be; }
.kgpop .kgpop-select {
    appearance: none; -webkit-appearance: none; cursor: pointer; color: #999;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23999' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 2px center; padding-right: 18px;
}
.kgpop .kgpop-select.has-value { color: #111; }

/* Honeypot — invisible to humans */
.kgpop-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.kgpop .kgpop-submit {
    display: block; width: 100%; margin: 8px 0 14px; padding: 13px;
    background: #111; color: #fff; border: none; border-radius: 0; cursor: pointer;
    font-family: inherit; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    transition: background 0.2s; box-shadow: none;
}
.kgpop .kgpop-submit:hover { background: #0097A7; }
.kgpop .kgpop-submit:disabled { opacity: 0.6; cursor: default; background: #111; }

.kgpop-msg { font-size: 12px; line-height: 1.5; margin: 0 0 12px !important; min-height: 0; }
.kgpop-msg.is-error { color: #b3261e; }

.kgpop-footer { display: flex; justify-content: space-between; align-items: center; }
.kgpop .kgpop-skip {
    padding: 0; margin: 0; background: none; border: none; box-shadow: none; cursor: pointer;
    font-family: inherit; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: #aaa; transition: color 0.15s;
}
.kgpop .kgpop-skip:hover { color: #666; }
.kgpop-note { font-size: 10px; color: #bbb; }

/* Success state */
.kgpop-success { display: none; padding: 44px 28px 40px; text-align: center; }
.kgpop.is-done .kgpop-body { display: none; }
.kgpop.is-done .kgpop-success { display: block; }
.kgpop-success-icon { font-size: 30px; color: #0097A7; margin-bottom: 12px !important; }
.kgpop-success-title { font-size: 17px; font-weight: 500; color: #111; margin-bottom: 6px !important; }
.kgpop-success-text  { font-size: 12px; color: #999; line-height: 1.65; }

/* Mobile: bottom sheet, no dimming overlay */
@media (max-width: 600px) {
    .kgpop { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 90vh; transform: translateY(40px); }
    .kgpop-band { padding: 22px 22px 18px; }
    .kgpop-headline { font-size: 19px; }
    .kgpop-body { padding: 22px 22px 20px; }
    .kgpop .kgpop-input, .kgpop .kgpop-select { font-size: 16px; } /* prevents iOS zoom on focus */
    .kgpop-overlay { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .kgpop, .kgpop-overlay { transition: none !important; }
}
