@import '../../../../styles/fills';
@import '../../../../styles/mixins';
@import '../../../../styles/definitions/variables';
@import '../../../../styles/definitions/placeholders';
@import '../../../../styles/definitions/breakpoints';
@import '../../../../styles/definitions/typography';
@import '../../../../styles/shared/editions';

$edition-border-radius: 4px;
$edition-ribbon-height: 32px;

.productEditionCard {
    @include shared-edition-addon-item;

    &_container {
        padding-top: $edition-ribbon-height;
    }
    &_ribbon {
        @include text-5;
        @include text-upper;
        @include color-white;
        @include background-emphasis;
        position: absolute;
        top: -$edition-ribbon-height;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        padding: 0 $edition-padding-x;
        height: $edition-ribbon-height;
        border-top-left-radius: $edition-border-radius;
        border-top-right-radius: $edition-border-radius;
    }
    &_main {
        background-color: $light-gray;
        height: var(--infoHeight, auto);

        &--with-details {
            flex-grow: 0;
        }
        &:not(&--with-ribbon) {
            border-top-left-radius: $edition-border-radius;
            border-top-right-radius: $edition-border-radius;
        }
        &:not(&--with-details):not(&--configurator-mode) {
            padding-bottom: $edition-padding-y;
            background-color: $white;
            border: 1px solid $mid-gray;
        }
        &:not(&--with-details) {
            border-bottom-left-radius: $edition-border-radius;
            border-bottom-right-radius: $edition-border-radius;
        }
        @include media-md-down {
            padding-top: 20px;
        }
    }
    &_details {
        display: flex;
        flex-direction: column;
        flex: 1 0 1px;
        padding: 24px $edition-padding-x 30px;
        background-color: $white;
        border: 1px solid $mid-gray;
        border-bottom-left-radius: $edition-border-radius;
        border-bottom-right-radius: $edition-border-radius;
    }
    &_header {
        height: var(--titleHeight, auto);
        margin: 0 0 15px;
    }
    &_title {
        @include title-2;
        margin: 0 0 15px;
    }
    &_description {
        font-size: $bodyFontSize5;
    }
    &_plans {
        flex-grow: 1;
    }
    &_section {
        margin-bottom: 14px;
        
        &Title {
            @include text-5;
            font-weight: 700;
        }

        &:last-child {
            margin-bottom: 0;
        }
    }
    &_pricing {
        & + & {
            margin-top: 5px;
        }

        &:not(&--primary) {
            //Small exception, price value must be bold
            .pricing_value {
                font-weight: 700;
            }
        }
    }
    &_discount {
        &Section {
            margin-top: 14px;
        }
        &Label {
            text-decoration: line-through;
        }
        &Off {
            margin-left: 10px;
            color: $success-color;
        }
    }
    &_audience,
    &_inclusions {
        @include text-5;
        margin-bottom: 22px;
        line-height: 22px;
    }

    &_bullets {
        @extend %reset-list;
        flex-grow: 1;
    }
    &_bullet {
        @include text-5;

        & + & {
            margin-top: 10px;
        }
    }
    &_selectedCheck {
        width: 24px;
        circle {
            fill: $emphasis-color;
        }
        path {
            @include fill-white;
        }
    }
    &_trialContainer {
        margin-top: 24px;
    }
    &_trialBadge {
        font-weight: normal;
    }
    &_header + &_actionsWrapper {
        margin-top: auto;
    }
}
