@use '../../styles/variables';
@use 'mixin';
@use './variables.scss' as style;

.#{style.$calendar-prefix-cls}-decade-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: style.$zindex-picker-panel;
    display: flex;
    flex-direction: column;
    background: variables.$bg-default;
    border-radius: variables.$border-radius-lg;
    outline: none;
}

.#{style.$calendar-prefix-cls}-decade-panel-hidden {
    display: none;
}

.#{style.$calendar-prefix-cls}-decade-panel-header {
    position: relative;
    @include mixin.calendarPanelHeader('thy-calendar-decade-panel');
}

.#{style.$calendar-prefix-cls}-decade-panel-body {
    flex: 1;
}

.#{style.$calendar-prefix-cls}-decade-panel-footer {
    border-top: style.$border-width-base style.$border-style-base style.$border-color-split;
    .#{style.$calendar-prefix-cls}-footer-extra {
        padding: 0 12px;
    }
}

.#{style.$calendar-prefix-cls}-decade-panel-table {
    width: 100%;
    height: 100%;
    table-layout: fixed;
    border-collapse: separate;
}

.#{style.$calendar-prefix-cls}-decade-panel-cell {
    white-space: nowrap;
    text-align: center;
}

.#{style.$calendar-prefix-cls}-decade-panel-decade {
    display: inline-block;
    height: 24px;
    margin: 0 auto;
    padding: 0 6px;
    color: variables.$text-color;
    line-height: 24px;
    text-align: center;
    background: transparent;
    border-radius: variables.$border-radius-sm;
    transition: background 0.3s ease;

    &:hover {
        background: style.$item-hover-bg;
        cursor: variables.$hand-cursor;
    }
}

.#{style.$calendar-prefix-cls}-decade-panel-selected-cell .#{style.$calendar-prefix-cls}-decade-panel-decade {
    color: variables.$text-color-inverse;
    background: variables.$primary;

    &:hover {
        color: variables.$text-color-inverse;
        background: variables.$primary;
    }
}

.#{style.$calendar-prefix-cls}-decade-panel-last-century-cell,
.#{style.$calendar-prefix-cls}-decade-panel-next-century-cell {
    .#{style.$calendar-prefix-cls}-decade-panel-decade {
        color: variables.$text-color;
        user-select: none;
    }
}
