.cpc-feedback-tab {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(52px + env(safe-area-inset-bottom));
    z-index: 10001;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    padding: 12px 17px;
    background: #0052a3;
    color: #ffffff;
    font: 700 14px Manrope, system-ui, sans-serif;
    box-shadow: 0 8px 24px rgba(0, 31, 76, 0.34), 0 0 0 1px rgba(0, 82, 163, 0.22);
    cursor: pointer;
    opacity: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.cpc-feedback-tab::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.cpc-feedback-tab:hover,
.cpc-feedback-tab:focus-visible {
    background: #003f80;
    border-color: rgba(255, 255, 255, 0.32);
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 31, 76, 0.4);
    outline: none;
}

.cpc-feedback-tab:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

.cpc-feedback-panel {
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(114px + env(safe-area-inset-bottom));
    z-index: 10002;
    width: min(365px, calc(100vw - 28px));
    padding: 25px;
    background: #f4f8fc;
    color: #122b49;
    border: 1px solid #b8cce0;
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(23, 56, 94, 0.35);
    font-family: Manrope, system-ui, sans-serif;
    box-sizing: border-box;
    max-height: calc(100dvh - 132px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.cpc-feedback-panel,
.cpc-feedback-panel h2,
.cpc-feedback-panel p,
.cpc-feedback-panel label,
.cpc-feedback-panel legend {
    color: #122b49 !important;
}

.cpc-feedback-panel[hidden] {
    display: none;
}

.cpc-feedback-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    color: #6b7b8e;
    font-size: 25px;
    cursor: pointer;
}

.cpc-feedback-kicker {
    margin: 0 0 4px;
    color: #0066cc;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cpc-feedback-panel h2 {
    margin: 0;
    color: #17385e;
    font: 700 25px 'Libre Baskerville', Georgia, serif;
}

.cpc-feedback-prompt {
    margin: 8px 0 16px;
    color: #56697f;
    font-size: 13px;
    line-height: 1.45;
}

.cpc-feedback-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cpc-feedback-choices button,
.cpc-feedback-details input,
.cpc-feedback-panel textarea,
.cpc-feedback-location {
    border: 1px solid #9eb7d0;
    border-radius: 10px;
    background: #f7faff;
    color: #122b49;
    font: 600 13px Manrope, system-ui, sans-serif;
}

.cpc-feedback-device {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 13px 0 0;
    padding: 0;
    border: 0;
    color: #294663;
    font-size: 12px;
}

.cpc-feedback-device legend {
    width: 100%;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 800;
}

.cpc-feedback-device label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.cpc-feedback-device input {
    accent-color: #0052a3;
}

.cpc-feedback-location-label {
    display: block;
    margin-top: 13px;
    margin-bottom: 5px;
    color: #294663;
    font-size: 12px;
    font-weight: 800;
}

.cpc-feedback-location {
    display: block;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.cpc-feedback-choices button {
    padding: 10px 8px;
    text-align: left;
    cursor: pointer;
}

.cpc-feedback-choices button:hover,
.cpc-feedback-choices button.selected {
    border-color: #0066cc;
    background: #e8f2ff;
}

.cpc-feedback-panel textarea {
    display: block;
    width: 100%;
    height: 92px;
    margin: 12px 0 9px;
    padding: 11px;
    resize: vertical;
    font-weight: 500;
    box-sizing: border-box;
}

.cpc-feedback-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cpc-feedback-details input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-weight: 500;
}

.cpc-feedback-submit {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #0052a3;
    color: #fff;
    font: 800 14px Manrope, system-ui, sans-serif;
    cursor: pointer;
}

.cpc-feedback-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.cpc-feedback-submit span {
    float: right;
    font-size: 18px;
}

.cpc-feedback-status {
    min-height: 18px;
    margin: 9px 0 0;
    color: #0066cc;
    font-size: 12px;
}

.cpc-feedback-status.error {
    color: #b42318;
}

.cpc-feedback-track { margin-top: 18px; padding-top: 14px; border-top: 1px solid #c5d5e4; }
.cpc-feedback-track strong { display: block; margin-bottom: 7px; color: #122b49 !important; font-size: 13px; }
.cpc-feedback-track div { display: flex; gap: 7px; }
.cpc-feedback-track input { min-width: 0; flex: 1; padding: 9px; border: 1px solid #9eb7d0; border-radius: 8px; background: #fff; color: #122b49; }
.cpc-feedback-track button { padding: 9px 10px; border: 0; border-radius: 8px; background: #dcecff; color: #075fb9; font-weight: 800; cursor: pointer; }

body.player-open .cpc-feedback-tab {
    bottom: calc(88px + env(safe-area-inset-bottom));
}

body.player-open .cpc-feedback-panel {
    bottom: calc(150px + env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
    .cpc-feedback-tab {
        bottom: calc(128px + env(safe-area-inset-bottom));
    }

    .cpc-feedback-panel {
        bottom: calc(190px + env(safe-area-inset-bottom));
        max-height: calc(100dvh - 208px);
    }

    body.player-open .cpc-feedback-tab {
        bottom: calc(160px + env(safe-area-inset-bottom));
    }

    body.player-open .cpc-feedback-panel {
        bottom: calc(222px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .cpc-feedback-tab {
        left: 12px;
        max-width: calc(100vw - 24px);
    }

    .cpc-feedback-panel {
        left: 12px;
        width: calc(100vw - 24px);
        padding: 21px;
    }

    .cpc-feedback-details {
        grid-template-columns: 1fr;
    }
}
