/* ── PPS Try-On v2.8.3 – Premium Modal (Sternenhimmel-Design) ───────────── */

.pps-tryon-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 9, 20, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: Inter, system-ui, sans-serif;
}

.pps-tryon-card {
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(10, 18, 34, 0.97) 0%, rgba(18, 40, 80, 0.96) 60%, rgba(12, 26, 58, 0.97) 100%);
    border: 1px solid rgba(95, 211, 255, 0.28);
    border-top: 1px solid rgba(95, 211, 255, 0.45);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(95, 211, 255, 0.06);
    color: #EaF2Fb;
    animation: pps-tryon-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pps-tryon-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.pps-tryon-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(95, 211, 255, 0.14);
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(10, 18, 34, 0.82));
    z-index: 2;
    border-radius: 20px 20px 0 0;
}
.pps-tryon-title {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    letter-spacing: 0.01em;
}
.pps-tryon-mode-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.pps-tryon-mode-badge.pps-mode-demo {
    background: rgba(255, 196, 84, 0.16);
    color: #FFD37A;
    border: 1px solid rgba(255, 196, 84, 0.35);
}
.pps-tryon-mode-badge.pps-mode-ai {
    background: rgba(95, 211, 255, 0.16);
    color: #5FD3FF;
    border: 1px solid rgba(95, 211, 255, 0.40);
}
.pps-tryon-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(95, 211, 255, 0.20);
    color: #EaF2Fb;
    width: 30px; height: 30px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.15s, transform 0.15s;
}
.pps-tryon-close:hover { background: rgba(255, 107, 107, 0.18); transform: translateY(-1px); }

/* Body */
.pps-tryon-body { padding: 16px 18px 20px; }
.pps-tryon-lead { font-size: 13.5px; line-height: 1.5; color: #C5D6Ea; margin: 0 0 14px; }

/* Upload-Tiles */
.pps-tryon-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.pps-tryon-tile {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(95, 211, 255, 0.18);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
}
.pps-tryon-tile > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex: 1;
}
.pps-tryon-tile-del {
    position: absolute;
    top: 6px; right: 6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 107, 0.92);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}
.pps-tryon-tile-view {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    border: none;
    background: rgba(6, 12, 26, 0.82);
    color: #C5D6Ea;
    font-size: 10.5px;
    padding: 4px 6px;
    cursor: pointer;
}
.pps-tryon-tile-add {
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border-style: dashed;
    color: #5FD3FF;
    transition: background 0.15s, border-color 0.15s;
}
.pps-tryon-tile-add:hover { background: rgba(95, 211, 255, 0.08); border-color: rgba(95, 211, 255, 0.5); }
.pps-tryon-plus { font-size: 26px; font-weight: 300; line-height: 1; }
.pps-tryon-add-lbl { font-size: 11px; }

/* Datenschutz-Hinweis */
.pps-tryon-privacy {
    font-size: 12px;
    line-height: 1.5;
    color: #9FB6CF;
    background: rgba(95, 211, 255, 0.06);
    border: 1px solid rgba(95, 211, 255, 0.16);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

/* Buttons */
.pps-tryon-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pps-tryon-result-actions { margin-top: 12px; }
.pps-tryon-btn {
    appearance: none;
    border: 1px solid rgba(95, 211, 255, 0.28);
    background: rgba(255, 255, 255, 0.05);
    color: #EaF2Fb;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: 11px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.pps-tryon-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(95, 211, 255, 0.12);
    box-shadow: 0 6px 18px rgba(95, 211, 255, 0.18);
}
.pps-tryon-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pps-tryon-btn-primary {
    background: linear-gradient(135deg, #5FD3FF 0%, #3AA0E0 100%);
    border-color: transparent;
    color: #051022;
}
.pps-tryon-btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 22px rgba(95, 211, 255, 0.4);
}
.pps-tryon-btn-shop {
    text-decoration: none;
    background: linear-gradient(135deg, #6BE08A 0%, #3FB76A 100%);
    border-color: transparent;
    color: #051a10;
    display: inline-flex;
    align-items: center;
}

/* Loader */
.pps-tryon-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 10px;
    text-align: center;
}
.pps-tryon-spinner {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 3px solid rgba(95, 211, 255, 0.18);
    border-top-color: #5FD3FF;
    animation: pps-tryon-spin 0.9s linear infinite;
}
@keyframes pps-tryon-spin { to { transform: rotate(360deg); } }
.pps-tryon-loader-text { font-size: 15px; font-weight: 700; margin: 4px 0 0; }
.pps-tryon-loader-sub { font-size: 12px; color: #9FB6CF; margin: 0; }

/* Stage */
.pps-tryon-stage-wrap { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.pps-tryon-stage {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    border: 1px solid rgba(95, 211, 255, 0.18);
    background: rgba(10, 18, 34, 0.95);
}
.pps-tryon-stage-tools {
    position: absolute;
    bottom: 10px; left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background: rgba(6, 12, 26, 0.7);
    border: 1px solid rgba(95, 211, 255, 0.22);
    border-radius: 999px;
    padding: 5px 8px;
    backdrop-filter: blur(4px);
}
.pps-tryon-tool {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(95, 211, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #EaF2Fb;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.15s, transform 0.15s;
}
.pps-tryon-tool:hover { background: rgba(95, 211, 255, 0.18); transform: translateY(-1px); }

/* Twin-Chips */
.pps-tryon-twin-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pps-tryon-chip {
    font-size: 11.5px;
    color: #5FD3FF;
    background: rgba(95, 211, 255, 0.10);
    border: 1px solid rgba(95, 211, 255, 0.24);
    border-radius: 999px;
    padding: 3px 10px;
}

/* Advisor-Row */
.pps-tryon-advisor-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(95, 211, 255, 0.06);
    border: 1px solid rgba(95, 211, 255, 0.16);
    border-radius: 12px;
    padding: 11px 12px;
    margin-bottom: 10px;
}
.pps-tryon-advisor-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(95, 211, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid rgba(95, 211, 255, 0.3);
}
.pps-tryon-advisor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pps-tryon-advisor-text { font-size: 13px; line-height: 1.5; margin: 0; color: #DCE8F5; }

/* Rückfragen-Chips */
.pps-tryon-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.pps-tryon-ask-lbl { font-size: 12px; color: #9FB6CF; }
.pps-tryon-ask-chip {
    font-size: 12px;
    color: #EaF2Fb;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(95, 211, 255, 0.35);
    border-radius: 999px;
    padding: 5px 11px;
    cursor: pointer;
    transition: background 0.15s;
}
.pps-tryon-ask-chip:hover { background: rgba(95, 211, 255, 0.14); }

/* Größen-Panel */
.pps-tryon-size {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(95, 211, 255, 0.18);
    border-radius: 12px;
    padding: 12px;
    width: 100%;
}
.pps-tryon-size-title { font-size: 12.5px; font-weight: 700; width: 100%; }
.pps-tryon-size label { font-size: 12px; color: #C5D6Ea; display: flex; align-items: center; gap: 5px; }
.pps-tryon-size input {
    width: 64px;
    background: rgba(6, 12, 26, 0.7);
    border: 1px solid rgba(95, 211, 255, 0.25);
    border-radius: 8px;
    color: #EaF2Fb;
    padding: 6px 8px;
    font-size: 13px;
}
.pps-tryon-size-verdict { font-size: 12px; color: #9FB6CF; width: 100%; margin: 4px 0 0; line-height: 1.5; }

/* Disclaimer */
.pps-tryon-disclaimer {
    font-size: 11.5px;
    color: #8FA6BF;
    line-height: 1.5;
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid rgba(95, 211, 255, 0.12);
}

/* ── Referenz-Galerie ─────────────────────────────────────────────────── */
.pps-tryon-gal-hint { font-size: 12px; color: #9FB6CF; margin: 8px 0 0; line-height: 1.5; }
.pps-gal-loading { padding: 30px; text-align: center; color: #9FB6CF; font-size: 13px; }
.pps-gal-lead { font-size: 13px; line-height: 1.5; color: #C5D6Ea; margin: 0 0 12px; }
.pps-gal-lead strong { color: #FFD37A; }

.pps-gal-refine {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(95,211,255,0.18);
    border-radius: 12px; padding: 10px; margin-bottom: 12px;
}
.pps-gal-refine-lbl { font-size: 12px; color: #9FB6CF; width: 100%; }
.pps-gal-input {
    flex: 1 1 130px; min-width: 0;
    background: rgba(6,12,26,0.7);
    border: 1px solid rgba(95,211,255,0.25);
    border-radius: 8px; color: #EaF2Fb; padding: 7px 9px; font-size: 13px;
}
.pps-gal-input-sm { flex: 0 0 64px; }
.pps-gal-apply { flex: 0 0 auto; }

.pps-gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px; margin-bottom: 12px;
}
.pps-gal-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(95,211,255,0.18);
    border-radius: 12px; overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.pps-gal-card:hover {
    transform: translateY(-2px);
    border-color: rgba(95,211,255,0.4);
    box-shadow: 0 8px 20px rgba(95,211,255,0.14);
}
.pps-gal-img-wrap { position: relative; aspect-ratio: 4 / 3; background: #0a1222; }
.pps-gal-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pps-gal-tag {
    position: absolute; top: 6px; left: 6px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
    background: rgba(255,196,84,0.16); color: #FFD37A;
    border: 1px solid rgba(255,196,84,0.35);
    border-radius: 999px; padding: 2px 8px;
}
.pps-gal-meta { padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; }
.pps-gal-breed { font-size: 13px; font-weight: 700; color: #EaF2Fb; }
.pps-gal-sub { font-size: 11.5px; color: #9FB6CF; }
.pps-gal-reason { font-size: 11.5px; color: #5FD3FF; margin-top: 2px; }
.pps-gal-credit { font-size: 10px; color: #6F86A0; margin-top: 3px; }

/* Mobile */
@media (max-width: 520px) {
    .pps-tryon-card { max-width: 100%; border-radius: 16px; }
    .pps-tryon-tiles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .pps-tryon-btn { flex: 1 1 calc(50% - 8px); justify-content: center; text-align: center; }
    .pps-gal-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* ── Hundeprofil ──────────────────────────────────────────────────────── */
.pps-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.pps-profile-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #9FB6CF;
}
.pps-profile-wide { grid-column: 1 / -1; }
.pps-profile-field input,
.pps-profile-field select {
    background: rgba(6, 12, 26, 0.7);
    border: 1px solid rgba(95, 211, 255, 0.25);
    border-radius: 9px;
    color: #EaF2Fb;
    padding: 9px 10px;
    font-size: 13.5px;
}
.pps-profile-field input:focus,
.pps-profile-field select:focus {
    outline: none;
    border-color: rgba(95, 211, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(95, 211, 255, 0.12);
}
.pps-profile-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #DCE8F5;
    cursor: pointer;
}
.pps-profile-check input { width: 16px; height: 16px; accent-color: #5FD3FF; }
.pps-profile-hint {
    font-size: 12px;
    color: #5FD3FF;
    background: rgba(95, 211, 255, 0.07);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 0 12px;
    min-height: 1px;
    line-height: 1.45;
}
.pps-profile-hint:empty { display: none; }
.pps-profile-section-title {
    grid-column: 1 / -1;
    font-size: 11.5px;
    font-weight: 700;
    color: #5FD3FF;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 8px 0 2px;
    padding-top: 8px;
    border-top: 1px solid rgba(95, 211, 255, 0.16);
}
.pps-profile-cond-note {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #8FA6BF;
    line-height: 1.5;
    margin: 4px 0 0;
}

/* Profil-Chip im Chat */
.pps-chat-chip-profile {
    background: rgba(95, 211, 255, 0.14) !important;
    border-color: rgba(95, 211, 255, 0.4) !important;
    color: #5FD3FF !important;
    font-weight: 700;
}

/* Toast */
.pps-profile-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 16px);
    background: linear-gradient(135deg, #5FD3FF 0%, #3AA0E0 100%);
    color: #051022;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1000000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.pps-profile-toast.pps-toast-show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
    .pps-profile-grid { grid-template-columns: 1fr; }
}

body.pps-modal-open { overflow: hidden; }
