@import '../../utils/colors.less';

.daggerheart.views.damage-reduction {
    .damage-reduction-container {
        position: relative;
        padding: 8px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;

        .rules-button {
            position: absolute;
            top: 4px;
            right: 4px;
            border-radius: 50%;

            &.inactive {
                opacity: 0.4;

                ::after {
                    position: absolute;
                    content: '/';
                    color: red;
                    font-weight: 700;
                    font-size: 1.8em;
                    left: 5px;
                    top: 0;
                    rotate: 13deg;
                }
            }
        }

        .section-container {
            display: flex;
            flex-direction: column;
            align-items: center;

            &.full-width {
                width: 100%;
            }
        }

        .padded {
            padding: 0 8px;
        }

        .armor-title {
            margin: 0;
            white-space: nowrap;
            width: 100%;
        }

        .resources-container {
            display: flex;
            gap: 8px;
            width: 100%;

            .resource-container {
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
            }
        }

        .mark-selection {
            display: flex;
            flex-direction: column;
            width: 100%;
            margin: 0;

            h4 {
                margin: 0;
            }

            .mark-selection-inner {
                display: flex;
                justify-content: center;
                gap: 8px;

                .mark-container {
                    cursor: pointer;
                    border: 1px solid light-dark(@dark-blue, @golden);
                    border-radius: 6px;
                    height: 26px;
                    padding: 0 1px;
                    font-size: var(--font-size-18);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    opacity: 0.4;

                    &.selected {
                        opacity: 1;
                    }

                    &.inactive {
                        cursor: initial;
                        opacity: 0.2;
                    }

                    &.spent {
                        ::after {
                            position: absolute;
                            content: '/';
                            color: red;
                            font-weight: 700;
                            font-size: 1.8em;
                            left: -1px;
                            top: -7px;
                            rotate: 13deg;
                        }
                    }

                    .fa-shield {
                        position: relative;
                        right: 0.5px;
                    }
                }
            }
        }

        .chip-container {
            margin: 0;
            width: 100%;

            .chip-inner-container {
                border: 1px solid light-dark(@dark-blue, @golden);
                border-radius: 6px;
                height: 26px;
                padding: 0 4px;
                font-size: var(--font-size-18);
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 4px;
                opacity: 0.4;

                &.active {
                    opacity: 1;
                    cursor: pointer;
                }

                &.selected {
                    opacity: 1;
                    background: var(--color-warm-2);
                    color: white;
                }

                .stress-reduction-cost {
                    display: flex;
                    align-items: center;
                }
            }
        }

        .threshold-label {
            opacity: 0.6;

            &.active {
                opacity: 1;
            }
        }

        .markers-subtitle {
            margin: -4px 0 0 0;

            &.bold {
                font-variant: all-small-caps;
                font-weight: bold;
            }
        }

        footer {
            display: flex;
            width: 100%;

            button {
                flex: 1;

                .damage-value {
                    font-weight: bold;

                    &.reduced-value {
                        opacity: 0.4;
                        text-decoration: line-through;
                    }
                }
            }
        }
    }
}
