.lk-theme-scope {
    color: var(--lk-color-text);
    font-family: var(--lk-font-family);
}

.lk-theme-scope *,
.lk-theme-scope *::before,
.lk-theme-scope *::after {
    box-sizing: border-box;
}

.lk-brand {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.lk-brand--full {
    width: 320px;
}

.lk-brand--mark {
    height: 40px;
    width: 40px;
}

.lk-brand--mark-sm {
    height: 32px;
    width: 32px;
}

.lk-brand--mark-lg {
    height: 64px;
    width: 64px;
}

/*
 * Canonical page heading for progressively modernized views. The shell also
 * applies this structure to legacy card headers whose actions are already
 * page-level controls, without changing their functional selectors.
 */
.lk-theme-scope .lk-page-header {
    align-items: center;
    display: flex;
    gap: var(--lk-space-5);
    justify-content: space-between;
}

.lk-page-header__copy {
    min-width: 0;
}

.lk-page-header__copy > small {
    color: var(--lk-color-text-muted);
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 5px;
}

.lk-page-header__actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: var(--lk-space-2);
    justify-content: flex-end;
}

.lk-screen-action {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--lk-radius-sm) !important;
    bottom: auto !important;
    box-shadow: none !important;
    display: inline-flex;
    float: none !important;
    font-size: 14px;
    font-weight: 500;
    gap: var(--lk-space-2);
    height: auto !important;
    justify-content: center;
    margin: 0 !important;
    min-height: 42px;
    padding: 9px 14px !important;
    position: static !important;
    right: auto !important;
    text-decoration: none;
    text-transform: none;
    width: auto !important;
}

.lk-screen-action > .zmdi,
.lk-screen-action > .glyphicon {
    color: currentColor;
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.lk-screen-action__label {
    line-height: 1.2;
    white-space: nowrap;
}

.lk-screen-action--contextual {
    min-width: 42px;
}

.lk-screen-action--contextual .lk-screen-action__label {
    display: none;
}

.lk-card {
    background: var(--lk-color-surface);
    border: 1px solid var(--lk-color-border);
    border-radius: var(--lk-radius-md);
    box-shadow: var(--lk-shadow-sm);
    color: var(--lk-color-text);
    overflow: hidden;
}

@media (max-width: 767px) {
    .lk-theme-scope .lk-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .lk-page-header__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        width: 100%;
    }

    .lk-page-header__actions .lk-screen-action,
    .lk-page-header__actions .lk-button {
        width: 100% !important;
    }
}

@media (max-width: 420px) {
    .lk-page-header__actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

.lk-card--interactive {
    transition: border-color var(--lk-transition-fast), box-shadow var(--lk-transition-fast), transform var(--lk-transition-fast);
}

.lk-card--interactive:hover {
    border-color: var(--lk-color-primary);
    box-shadow: var(--lk-shadow-md);
    transform: translateY(-1px);
}

.lk-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--lk-radius-sm);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    font-weight: 500;
    gap: var(--lk-space-2);
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    transition: background-color var(--lk-transition-fast), border-color var(--lk-transition-fast), box-shadow var(--lk-transition-fast);
}

.lk-button:focus,
.lk-control:focus,
.lk-link:focus,
.lk-icon-button:focus {
    outline: 3px solid var(--lk-color-focus);
    outline-offset: 2px;
}

.lk-button--primary {
    background: var(--lk-color-primary);
    color: var(--lk-color-surface);
}

html[data-theme="dark"] .lk-button--primary {
    color: var(--lk-color-sidebar-strong);
}

.lk-button--primary:hover,
.lk-button--primary:active {
    background: var(--lk-color-primary-hover);
}

.lk-button--secondary {
    background: var(--lk-color-surface);
    border-color: var(--lk-color-border);
    color: var(--lk-color-text);
}

.lk-button--secondary:hover,
.lk-button--secondary:active {
    background: var(--lk-color-surface-hover);
    border-color: var(--lk-color-primary);
    color: var(--lk-color-primary);
}

.lk-button--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--lk-color-text-muted);
}

.lk-button--ghost:hover,
.lk-button--ghost:active {
    background: var(--lk-color-surface-hover);
    color: var(--lk-color-text);
}

.lk-button--block {
    width: 100%;
}

.lk-control {
    background: var(--lk-color-surface);
    border: 1px solid var(--lk-color-border);
    border-radius: var(--lk-radius-sm);
    color: var(--lk-color-text);
    display: block;
    font-family: var(--lk-font-family);
    font-size: 15px;
    min-height: 44px;
    padding: 10px 12px;
    transition: border-color var(--lk-transition-fast), box-shadow var(--lk-transition-fast);
    width: 100%;
}

.lk-control:hover {
    border-color: var(--lk-color-text-muted);
}

.lk-control::placeholder {
    color: var(--lk-color-text-muted);
    opacity: 1;
}

.lk-field {
    margin-bottom: var(--lk-space-4);
    text-align: left;
}

.lk-field__label {
    color: var(--lk-color-text);
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--lk-space-2);
}

.lk-field__control {
    position: relative;
}

.lk-field__control > .zmdi {
    color: var(--lk-color-text-muted);
    font-size: 19px;
    left: 13px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.lk-field__control > .lk-control {
    padding-left: 42px;
}

.lk-link {
    color: var(--lk-color-primary);
    font-weight: 500;
    text-decoration: none;
}

.lk-link:hover,
.lk-link:active {
    color: var(--lk-color-primary-hover);
    text-decoration: underline;
}

.lk-link-button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.lk-icon-button {
    align-items: center;
    background: var(--lk-color-surface);
    border: 1px solid var(--lk-color-border);
    border-radius: 999px;
    color: var(--lk-color-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    gap: var(--lk-space-2);
    justify-content: center;
    min-height: 40px;
    padding: 8px 13px;
    transition: background-color var(--lk-transition-fast), border-color var(--lk-transition-fast);
}

.lk-icon-button:hover {
    background: var(--lk-color-surface-hover);
}

.lk-alert {
    border-radius: var(--lk-radius-sm);
    font-size: 14px;
    margin-bottom: var(--lk-space-4);
    padding: 11px 12px;
    text-align: left;
}

.lk-alert--danger {
    background: var(--lk-color-danger-soft);
    border-left: 3px solid var(--lk-color-danger);
    color: var(--lk-color-danger);
}
