.a360-insights-open {
    font-weight: 600;
    text-decoration: none
}

.a360-insights-modal {
    display: none
}

.a360-insights-modal.is-open {
    display: block
}

.a360-insights-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 100000
}

.a360-insights-dialog {
    position: fixed;
    z-index: 100001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, calc(100vw - 40px));
    max-height: calc(100vh - 60px);
    overflow: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 24px
}

.a360-insights-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 16px
}

.a360-insights-header h2 {
    margin: 0 0 4px
}

.a360-insights-post-title {
    margin: 0;
    color: #646970
}

.a360-insights-close {
    font-size: 32px;
    line-height: 1;
    text-decoration: none
}

.a360-insights-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0
}

.a360-insights-tabs {
    display: flex;
    gap: 8px;
    margin: 0
}

.a360-insights-tabs button {
    border: 1px solid #c3c4c7;
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer
}

.a360-insights-tabs button.active {
    background: #1d2327;
    color: #fff;
    border-color: #1d2327
}

.a360-insights-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px
}

.a360-insights-summary strong {
    font-size: 28px
}

.a360-insights-chart-wrap {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px
}

.a360-insights-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px
}

.a360-insights-grid h3 {
    margin-top: 0
}

.a360-insights-export-form {
    margin-top: 20px
}

@media(max-width:780px) {
    .a360-insights-grid {
        grid-template-columns: 1fr
    }

    .a360-insights-dialog {
        width: calc(100vw - 24px);
        padding: 16px
    }
}

.a360-insights-period-nav {
    display: flex;
    align-items: center;
    gap: 10px
}

.a360-insights-period-label {
    min-width: 160px;
    text-align: center
}

.a360-insights-quick {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.a360-insights-period-nav .button:disabled {
    opacity: .45;
    cursor: not-allowed
}

@media(max-width:780px) {
    .a360-insights-toolbar {
        align-items: flex-start
    }

    .a360-insights-period-nav {
        order: 3;
        width: 100%;
        justify-content: center
    }

    .a360-insights-period-label {
        min-width: auto
    }
}

.a360-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dcdcde;
    border-radius: 6px
}

.a360-table-wrap table {
    border: 0
}

.a360-table-wrap thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2
}

.a360-recent-wrap {
    overflow-x: auto
}

.a360-insights-danger-zone {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

.a360-insights-reset-all {
    color: #b32d2e;
    border-color: #b32d2e
}

.a360-insights-reset-all:hover,
.a360-insights-reset-all:focus {
    color: #8a2424;
    border-color: #8a2424
}

.a360-content-selector {
    position: relative;
    max-width: 720px
}

.a360-content-results {
    position: absolute;
    z-index: 1000;
    top: 38px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    max-height: 280px;
    overflow: auto
}

.a360-content-result {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f0f0f1;
    background: #fff;
    text-align: left;
    cursor: pointer
}

.a360-content-result:hover,
.a360-content-result:focus {
    background: #f6f7f7
}

.a360-content-result.is-selected {
    opacity: .55;
    cursor: not-allowed
}

.a360-content-result.is-empty {
    display: block;
    color: #646970;
    cursor: default
}

.a360-content-result span {
    font-weight: 600
}

.a360-content-result small {
    color: #646970;
    white-space: nowrap
}

.a360-content-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px
}

.a360-content-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 999px;
    padding: 6px 10px
}

.a360-content-pill span {
    font-weight: 600
}

.a360-content-pill small {
    color: #646970
}

.a360-content-remove {
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    color: #646970
}

.a360-content-remove:hover {
    color: #b32d2e
}

@media(max-width:782px) {
    .a360-content-results {
        top: 42px
    }

    .a360-content-result {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px
    }

    .a360-content-pill {
        border-radius: 8px
    }
}

.a360-insights-view-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    border-bottom: 1px solid #dcdcde
}

.a360-insights-view-tabs button {
    border: 0;
    background: transparent;
    border-bottom: 3px solid transparent;
    padding: 10px 12px;
    margin-bottom: -1px;
    cursor: pointer;
    font-weight: 600
}

.a360-insights-view-tabs button.active {
    border-bottom-color: #2271b1;
    color: #2271b1
}

.a360-insights-panel {
    display: none
}

.a360-insights-panel.is-active {
    display: block
}

.a360-insights-panel h3 {
    margin-top: 0
}

.a360-insights-panel .description {
    margin-top: -6px;
    margin-bottom: 12px
}

.a360-insights-chart-wrap .a360-insights-sources-empty {
    text-align: center;
    margin: 10px 0 0
}

/* Settings polish */
.a360-insights-settings {
    max-width: 1280px
}

.a360-settings-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 20px 0 18px;
    padding: 24px;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #f6f7f7)
}

.a360-settings-hero h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2
}

.a360-settings-hero p {
    margin: 0;
    color: #50575e;
    font-size: 14px
}

.a360-settings-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end
}

.a360-settings-badges span {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c3c4c7;
    border-radius: 999px;
    background: #fff;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327
}

.a360-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start
}

.a360-settings-main {
    min-width: 0
}

.a360-settings-sidebar {
    position: sticky;
    top: 46px;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.a360-settings-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    margin: 0 0 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    overflow: hidden
}

.a360-settings-card>header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f1;
    background: #fbfbfc
}

.a360-settings-card h2 {
    margin: 0;
    font-size: 16px
}

.a360-settings-card header p,
.a360-settings-card-compact p {
    margin: 6px 0 0;
    color: #646970
}

.a360-settings-card .form-table {
    margin: 0
}

.a360-settings-card .form-table th {
    padding-left: 20px;
    width: 190px
}

.a360-settings-card .form-table td {
    padding-right: 20px
}

.a360-settings-card-compact {
    padding: 18px
}

.a360-settings-card-compact h2 {
    margin: 0 0 12px
}

.a360-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px
}

.a360-checkbox-grid label,
.a360-radio-cards label,
.a360-toggle-list label,
.a360-inline-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0
}

.a360-checkbox-grid label {
    align-items: center;
    padding: 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff
}

.a360-checkbox-grid code {
    margin-left: auto;
    font-size: 11px
}

.a360-radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px
}

.a360-radio-cards label {
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #fff
}

.a360-radio-cards label:has(input:checked) {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background: #f6fbff
}

.a360-radio-cards strong {
    display: block;
    margin-bottom: 4px
}

.a360-radio-cards small {
    display: block;
    color: #646970;
    line-height: 1.4
}

.a360-toggle-list {
    display: grid;
    gap: 10px
}

.a360-toggle-list label {
    padding: 8px 0
}

.a360-status-list {
    margin: 0
}

.a360-status-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1
}

.a360-status-list li:last-child {
    border-bottom: 0
}

.a360-status-list span {
    font-weight: 600;
    color: #1d2327
}

.a360-danger-card {
    max-width: 940px
}

.a360-danger-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-left: 4px solid #d63638;
    background: #fff
}

.a360-danger-box h3 {
    margin: 0 0 8px;
    color: #b32d2e
}

.a360-danger-box p {
    margin: 0 0 8px
}

.a360-danger-box form {
    flex: 0 0 auto
}

@media(max-width:960px) {
    .a360-settings-layout {
        grid-template-columns: 1fr
    }

    .a360-settings-sidebar {
        position: static
    }

    .a360-settings-hero {
        align-items: flex-start;
        flex-direction: column
    }

    .a360-settings-badges {
        justify-content: flex-start
    }

    .a360-danger-box {
        align-items: flex-start;
        flex-direction: column
    }

    .a360-settings-card .form-table th {
        width: auto;
        padding-left: 20px
    }
}

@media(max-width:782px) {

    .a360-settings-card .form-table th,
    .a360-settings-card .form-table td {
        display: block;
        width: auto;
        padding: 12px 16px
    }

    .a360-settings-card .form-table th {
        padding-bottom: 0
    }

    .a360-radio-cards,
    .a360-checkbox-grid {
        grid-template-columns: 1fr
    }
}

.a360-insights-views-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    vertical-align: middle;
}

.a360-insights-views-icon span {
    display: block;
    width: 4px;
    background: currentColor;
    border-radius: 2px 2px 0 0;
}

.a360-insights-views-icon span:nth-child(1) {
    height: 6px;
}

.a360-insights-views-icon span:nth-child(2) {
    height: 10px;
}

.a360-insights-views-icon span:nth-child(3) {
    height: 14px;
}