/* PPG Pi Board – Frontend Styles */

body.ppg-pib-has-fullscreen {
    overflow: hidden !important;
}

.ppg-pib-screen {
    --ppg-bg: #04070b;
    --ppg-panel: rgba(13, 18, 27, 0.9);
    --ppg-panel-strong: rgba(10, 14, 22, 0.96);
    --ppg-card-bg: rgba(255, 255, 255, 0.06);
    --ppg-card-border: rgba(255, 255, 255, 0.09);
    --ppg-accent: #18b8e6;
    --ppg-accent-soft: rgba(24, 184, 230, 0.18);
    --ppg-text: #f5f7fb;
    --ppg-text-muted: #a7b1c2;
    --ppg-gap: clamp(12px, 1vw, 20px);
    --ppg-padding: clamp(14px, 1.25vw, 26px);
    --ppg-radius: 22px;
    --ppg-sidebar-w: clamp(300px, 18vw, 380px);
    --ppg-footer-h: clamp(165px, 17vh, 220px);
    --ppg-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(24, 184, 230, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(255, 140, 66, 0.14), transparent 28%),
        linear-gradient(180deg, #06090e 0%, #030508 100%);
    box-sizing: border-box;
    color: var(--ppg-text);
    display: grid;
    font-family: var(--ppg-font);
    gap: var(--ppg-gap);
    grid-template-areas:
        "sidebar main"
        "footer footer";
    grid-template-columns: var(--ppg-sidebar-w) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--ppg-footer-h);
    min-height: 100dvh;
    overflow: hidden;
    padding: var(--ppg-padding);
    width: 100%;
}

.ppg-pib-screen,
.ppg-pib-screen * {
    box-sizing: border-box;
}

.ppg-pib-screen--fullscreen {
    height: 100dvh;
    inset: 0;
    max-width: none !important;
    position: fixed;
    z-index: 9999;
}

.admin-bar .ppg-pib-screen--fullscreen {
    height: calc(100dvh - 32px);
    top: 32px;
}

.ppg-pib-screen--embed {
    height: 100dvh;
    left: 50%;
    margin-left: -50vw;
    max-width: none !important;
    position: relative;
    width: 100vw;
}

.ppg-pib-screen .ppg-region {
    display: flex;
    flex-direction: column;
    gap: var(--ppg-gap);
    min-height: 0;
    min-width: 0;
}

.ppg-pib-screen .ppg-left-sidebar {
    grid-area: sidebar;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: none;
}

.ppg-pib-screen .ppg-left-sidebar::-webkit-scrollbar {
    display: none;
}

.ppg-pib-screen .ppg-top-right-main {
    grid-area: main;
}

.ppg-pib-screen .ppg-bottom-footer {
    grid-area: footer;
}

.ppg-pib-screen .ppg-module {
    background: var(--ppg-panel);
    border: 1px solid var(--ppg-card-border);
    border-radius: var(--ppg-radius);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.26);
    min-height: 0;
    overflow: hidden;
}

.ppg-pib-screen .ppg-mod-heading {
    color: var(--ppg-accent);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.ppg-pib-screen .ppg-fallback,
.ppg-pib-screen .ppg-loading,
.ppg-pib-screen .ppg-teamup-error {
    color: var(--ppg-text-muted);
    font-size: 1rem;
    margin: 0;
    padding: 20px 22px;
}

.ppg-pib-screen .ppg-teamup-error {
    color: #ff8a80;
}

.ppg-teamup,
.ppg-shortcode,
.ppg-html {
    padding: 20px;
}

.ppg-teamup-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ppg-teamup-card {
    background: var(--ppg-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    padding: 16px 18px;
}

.ppg-teamup-card .ppg-ev-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.ppg-teamup-card .ppg-ev-time,
.ppg-teamup-card .ppg-ev-loc {
    color: var(--ppg-text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.ppg-teamup-card .ppg-ev-loc {
    margin-top: 3px;
}

.ppg-top-right-main .ppg-video {
    background: var(--ppg-panel-strong);
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
}

.ppg-video-stage {
    background: #000;
    border-radius: calc(var(--ppg-radius) - 8px);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
}

.ppg-video-player,
.ppg-video-embed,
.ppg-video-iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.ppg-video-player,
.ppg-video-iframe {
    background: #000;
    object-fit: cover;
}

.ppg-video-embed[hidden] {
    display: none !important;
}

.ppg-video-embed {
    inset: 0;
    position: absolute;
    width: 100%;
    height: 100%;
}

.ppg-video-embed > .ppg-video-iframe {
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.ppg-video-slideshow {
    background: #000;
    height: 100%;
    isolation: isolate;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.ppg-video-slide {
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity var(--ppg-slide-fade-duration, 900ms) ease;
}

.ppg-video-slide.is-active {
    opacity: 1;
}

.ppg-video-slide-image {
    display: block;
    height: 100%;
    object-fit: cover;
    transform: var(--ppg-slide-start-transform, scale(1.03));
    transition: transform var(--ppg-slide-zoom-duration, 6000ms) linear;
    width: 100%;
}

.ppg-video-slide.is-active .ppg-video-slide-image {
    transform: var(--ppg-slide-end-transform, scale(1.12));
}

.ppg-video-slide.is-leaving .ppg-video-slide-image {
    transform: var(--ppg-slide-end-transform, scale(1.12));
}

.ppg-video-tour-meta {
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
    background: rgba(7, 12, 18, 0.58);
    border: 1px solid rgba(247, 251, 255, 0.16);
    border-radius: 18px;
    bottom: 22px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    color: #f7fbff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    left: 22px;
    max-width: calc(100% - 44px);
    padding: 16px 18px 18px;
    position: absolute;
    right: auto;
    width: min(720px, calc(100% - 44px));
    z-index: 3;
}

.ppg-video-tour-title {
    font-size: clamp(1.15rem, 0.9rem + 0.75vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-transform: uppercase;
}

.ppg-video-tour-address {
    color: rgba(247, 251, 255, 0.88);
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    font-size: clamp(0.92rem, 0.7rem + 0.45vw, 1.15rem);
    gap: 2px;
    line-height: 1.35;
}

.ppg-video-tour-address-line {
    display: block;
}

@media (max-width: 960px) {
    .ppg-video-tour-meta {
        bottom: 16px;
        left: 16px;
        max-width: calc(100% - 32px);
        padding: 14px 16px 16px;
        width: calc(100% - 32px);
    }
}

.ppg-bottom-footer .ppg-module {
    display: flex;
    height: 100%;
    width: 100%;
}

.ppg-hifive {
    align-items: stretch;
    background:
        linear-gradient(90deg, rgba(208, 155, 44, 0.16), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    display: flex;
    padding: 18px 22px;
}

.ppg-hifive .ppg-mod-heading {
    color: #d09b2c;
}

.ppg-hifive-logo {
    align-items: center;
    display: flex;
    flex: 0 0 120px;
    justify-content: center;
    padding-right: 18px;
}

.ppg-hifive-logo img {
    max-height: 86px;
    max-width: 100px;
}

.ppg-hifive-inner {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.ppg-hifive-track {
    min-height: 88px;
    position: relative;
    width: 100%;
}

.ppg-hifive-slide {
    align-items: center;
    display: flex;
    gap: 22px;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.6s ease;
}

.ppg-hifive-slide.ppg-hifive-active {
    opacity: 1;
    pointer-events: auto;
}

.ppg-hifive-meta {
    display: flex;
    flex: 0 0 280px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ppg-hifive-slide .ppg-hf-to,
.ppg-hifive-slide .ppg-hf-from {
    color: var(--ppg-text);
    font-size: 1rem;
    white-space: normal;
}

.ppg-hifive-slide .ppg-hf-msg {
    color: var(--ppg-text);
    flex: 1;
    font-size: clamp(1.1rem, 1vw + 0.7rem, 1.45rem);
    font-weight: 600;
    line-height: 1.35;
}

.ppg-shortcode,
.ppg-html {
    color: var(--ppg-text);
    font-size: 1rem;
}

.ppg-high-five-form-wrap {
    --ppg-accent: #18b8e6;
    --ppg-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --ppg-text: #f5f7fb;
    --ppg-text-muted: #a7b1c2;
    color: var(--ppg-text);
    font-family: var(--ppg-font, "Segoe UI", "Helvetica Neue", Arial, sans-serif);
    margin: 0 auto;
    max-width: 760px;
}

.ppg-high-five-form {
    background: rgba(13, 18, 27, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: clamp(18px, 3vw, 30px);
}

.ppg-high-five-form,
.ppg-high-five-form * {
    box-sizing: border-box;
}

.ppg-high-five-header h2 {
    color: var(--ppg-text);
    font-size: clamp(1.45rem, 1.2rem + 0.6vw, 1.9rem);
    margin: 0 0 6px;
}

.ppg-high-five-header p {
    color: var(--ppg-text-muted);
    margin: 0;
}

.ppg-high-five-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ppg-high-five-field.is-hidden {
    display: none;
}

.ppg-high-five-search-row {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 124px;
}

.ppg-high-five-input,
.ppg-high-five-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: var(--ppg-text);
    font: inherit;
    min-width: 0;
    padding: 14px 16px;
    width: 100%;
}

.ppg-high-five-input::placeholder,
.ppg-high-five-textarea::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.ppg-high-five-input:focus,
.ppg-high-five-textarea:focus {
    border-color: var(--ppg-accent);
    box-shadow: 0 0 0 3px rgba(24, 184, 230, 0.18);
    outline: none;
}

.ppg-high-five-textarea {
    min-height: 150px;
    resize: vertical;
}

.ppg-high-five-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ppg-high-five-results__empty {
    color: var(--ppg-text-muted);
    margin: 0;
    padding: 6px 2px 0;
}

.ppg-high-five-result {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    color: var(--ppg-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    text-align: left;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ppg-high-five-result:hover,
.ppg-high-five-result:focus {
    background: rgba(24, 184, 230, 0.14);
    border-color: rgba(24, 184, 230, 0.5);
    outline: none;
    transform: translateY(-1px);
}

.ppg-high-five-result strong {
    font-size: 1rem;
}

.ppg-high-five-result span {
    color: var(--ppg-text-muted);
    font-size: 0.95rem;
}

.ppg-high-five-summary,
.ppg-high-five-alert,
.ppg-high-five-status {
    border-radius: 18px;
    padding: 14px 16px;
}

.ppg-high-five-summary[hidden] {
    display: none !important;
}

.ppg-high-five-summary {
    background: rgba(24, 184, 230, 0.1);
    border: 1px solid rgba(24, 184, 230, 0.16);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ppg-high-five-summary__label {
    color: var(--ppg-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ppg-high-five-summary span {
    color: var(--ppg-text-muted);
}

.ppg-high-five-summary--recipient .ppg-high-five-selected-name:empty,
.ppg-high-five-summary--recipient .ppg-high-five-selected-email:empty {
    display: none;
}

.ppg-high-five-alert {
    background: rgba(255, 196, 0, 0.11);
    border: 1px solid rgba(255, 196, 0, 0.18);
}

.ppg-high-five-alert--error,
.ppg-high-five-status.is-error {
    background: rgba(255, 120, 120, 0.12);
    border: 1px solid rgba(255, 120, 120, 0.2);
    color: #ffd1d1;
}

.ppg-high-five-alert--info,
.ppg-high-five-status.is-info {
    background: rgba(24, 184, 230, 0.1);
    border: 1px solid rgba(24, 184, 230, 0.16);
    color: var(--ppg-text);
}

.ppg-high-five-status.is-success {
    background: rgba(47, 192, 122, 0.14);
    border: 1px solid rgba(47, 192, 122, 0.22);
    color: #d8ffe8;
}

.ppg-high-five-status:empty {
    display: none;
}

.ppg-high-five-manual-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ppg-high-five-actions {
    display: flex;
    justify-content: flex-end;
}

.ppg-high-five-search-btn,
.ppg-high-five-submit {
    -webkit-appearance: none;
    appearance: none;
    align-items: center;
    background: linear-gradient(135deg, #2096ff 0%, #2e6df6 100%);
    border: 1px solid rgba(109, 173, 255, 0.55);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color: #f8fbff;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 46px;
    min-width: 124px;
    padding: 0 18px;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
    white-space: nowrap;
    width: 100%;
}

.ppg-high-five-search-btn:hover,
.ppg-high-five-submit:hover {
    background: linear-gradient(135deg, #35a8ff 0%, #437bff 100%);
    box-shadow: 0 12px 20px rgba(18, 58, 126, 0.22);
    transform: translateY(-1px);
}

.ppg-high-five-search-btn:focus,
.ppg-high-five-submit:focus {
    box-shadow: 0 0 0 3px rgba(24, 184, 230, 0.22), 0 10px 20px rgba(18, 58, 126, 0.18);
    outline: none;
}

.ppg-high-five-search-btn:disabled,
.ppg-high-five-submit:disabled {
    cursor: wait;
    opacity: 0.58;
    transform: none;
}

.ppg-high-five-clear-recipient {
    -webkit-appearance: none;
    appearance: none;
    align-self: flex-start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--ppg-accent);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 600;
    margin-top: 6px;
    min-height: 0;
    min-width: 0;
    padding: 0;
    text-decoration: none;
    width: auto;
}

.ppg-high-five-clear-recipient:hover,
.ppg-high-five-clear-recipient:focus {
    color: #7edfff;
    outline: none;
    text-decoration: underline;
}

@media (max-width: 782px) {
    .admin-bar .ppg-pib-screen--fullscreen {
        height: calc(100dvh - 46px);
        top: 46px;
    }
}

@media (max-width: 960px) {
    .ppg-pib-screen,
    .ppg-pib-screen--embed {
        height: auto;
        left: auto;
        margin-left: 0;
        min-height: 100dvh;
        width: 100%;
    }

    .ppg-pib-screen {
        grid-template-areas:
            "main"
            "sidebar"
            "footer";
        grid-template-columns: 1fr;
        grid-template-rows: minmax(320px, 42vh) auto auto;
    }

    .ppg-hifive-slide {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        justify-content: center;
    }

    .ppg-hifive-meta {
        flex: 0 0 auto;
        width: 100%;
    }

    .ppg-hifive-slide .ppg-hf-to,
    .ppg-hifive-slide .ppg-hf-from {
        white-space: normal;
    }

    .ppg-high-five-search-row,
    .ppg-high-five-manual-grid {
        grid-template-columns: 1fr;
    }

    .ppg-high-five-search-btn {
        min-width: 0;
    }

    .ppg-high-five-actions {
        justify-content: stretch;
    }

    .ppg-high-five-submit,
    .ppg-high-five-search-btn {
        width: 100%;
    }
}
