:host {
    --site-settings-drawer-width: 100vw;
}

.site-settings-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    background: var(--p-surface-0);
    overflow: hidden;
}

.site-settings-header {
    display: grid;
    gap: 0.45rem;
    padding: 0.15rem 1.25rem 1rem;
    border-bottom: 1px solid var(--p-content-border-color);
}

.site-settings-header h2 {
    margin: 0;
    color: var(--p-text-color);
    font-size: 1.125rem;
    font-weight: 750;
    letter-spacing: 0;
    line-height: 1.3;
}

.site-settings-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    color: var(--p-text-muted-color);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.site-settings-breadcrumb span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-settings-breadcrumb i {
    color: var(--p-text-muted-color);
    font-size: 0.7rem;
    flex: 0 0 auto;
}

.site-settings-breadcrumb__current {
    color: var(--p-text-color);
    font-weight: 650;
}

.site-settings-tab-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: max-content;
}

.site-settings-tab-label i {
    font-size: 0.875rem;
}

.site-settings-tab-label--danger i {
    color: var(--p-red-500);
}

:host ::ng-deep .p-drawer {
    height: 100dvh;
    max-height: 100dvh;
    border-left: 1px solid var(--p-content-border-color);
    box-shadow: -18px 0 48px rgb(15 23 42 / 0.14);
}

:host ::ng-deep .p-drawer-header {
    flex: 0 0 auto;
    padding: 0.75rem 1.25rem 0.35rem;
}

:host ::ng-deep .p-drawer-content {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

:host ::ng-deep .site-settings-tabs {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

:host ::ng-deep .site-settings-tabs > .p-tablist {
    flex: 0 0 auto;
    border-bottom: 1px solid var(--p-content-border-color);
    padding-inline: 1.25rem;
}

:host ::ng-deep .site-settings-tabs .p-tablist-tab-list {
    background: transparent;
    gap: 0.25rem;
}

:host ::ng-deep .site-settings-tabs .p-tab {
    padding: 0.875rem 0.7rem;
    color: var(--p-text-muted-color);
    font-size: 0.875rem;
    font-weight: 650;
    letter-spacing: 0;
}

:host ::ng-deep .site-settings-tabs .p-tab[aria-selected="true"] {
    color: var(--p-text-color);
}

:host ::ng-deep .site-settings-tabs .p-tabpanels {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: var(--p-surface-50);
}

:host ::ng-deep .site-settings-tabs .p-tabpanel {
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.25rem 1.5rem;
}

:host ::ng-deep .site-settings-tabs .p-tabpanel[aria-hidden="false"],
:host ::ng-deep .site-settings-tabs .p-tabpanel:not([hidden]) {
    display: block;
}

:host-context(.p-dark) .site-settings-shell {
    background: var(--p-surface-950);
}

:host-context(.p-dark) .site-settings-header {
    border-bottom-color: var(--p-surface-800);
}

:host-context(.p-dark) ::ng-deep .p-drawer {
    border-left-color: var(--p-surface-700);
    box-shadow: -20px 0 56px rgb(0 0 0 / 0.52);
}

:host-context(.p-dark) ::ng-deep .p-drawer-header,
:host-context(.p-dark) ::ng-deep .p-drawer-content {
    background: var(--p-surface-950);
}

:host-context(.p-dark) ::ng-deep .site-settings-tabs > .p-tablist {
    border-bottom-color: var(--p-surface-800);
}

:host-context(.p-dark) ::ng-deep .site-settings-tabs .p-tabpanels {
    background: color-mix(in srgb, var(--p-surface-950) 88%, var(--p-surface-900) 12%);
}

:host-context(.p-dark) ::ng-deep .site-settings-tabs .p-tab {
    color: color-mix(in srgb, var(--p-text-muted-color) 86%, var(--p-surface-300) 14%);
}

:host-context(.p-dark) ::ng-deep .site-settings-tabs .p-tab[aria-selected="true"] {
    color: var(--p-text-color);
}

@media (min-width: 768px) {
    :host {
        --site-settings-drawer-width: 720px;
    }
}

@media (min-width: 1280px) {
    :host {
        --site-settings-drawer-width: 900px;
    }
}

@media (min-width: 1536px) {
    :host {
        --site-settings-drawer-width: 960px;
    }
}

@media (max-width: 640px) {
    .site-settings-header {
        padding-inline: 1rem;
    }

    :host ::ng-deep .p-drawer-header {
        padding-inline: 1rem;
    }

    :host ::ng-deep .site-settings-tabs > .p-tablist {
        padding-inline: 1rem;
    }

    :host ::ng-deep .site-settings-tabs .p-tabpanel {
        padding: 0.85rem 1rem 1.25rem;
    }
}
