$right-part-width: 200px;

download-schedule-dialog {
    .p-overlaypanel {
        position: relative;
        top: auto !important;
        left: auto !important;
        z-index: 100;
        margin: 0;
        margin-top: -1px;
        border: 1.3px solid $border-blue;
        box-shadow: 0 2px 2px #b1b1b134;
        border-radius: 0 0 $border-radius $border-radius;

        &:before,
        &:after {
            display: none;
        }

        .p-overlaypanel-content {
            padding: 0 !important;

            .p-tabview {
                display: flex;
                flex-direction: row-reverse;
                padding: 0;

                .p-tabview-nav {
                    background-color: $blue-extra-light;
                    margin-bottom: 0;
                    border-left: 1.3px solid $border-blue;
                    border-radius: 0;

                    li {
                        background-color: transparent;
                        margin: 0;
                        top: auto;
                        border: none;
                        float: none;
                        border: none;
                        border-radius: 0;
                        border-top: 1px solid transparent;
                        border-bottom: 1px solid transparent;
                        margin-left: -1.3px;

                        a {
                            font-weight: $font-regular;
                            color: $blue;
                            padding: $space-l $space-xl;
                            border: none;
                            border-radius: 0;
                        }

                        &.p-tabview-selected {
                            background-color: $white;
                            border-top: 1px solid $border;
                            border-bottom: 1px solid $border;

                            &:hover {
                                border-top: 1px solid $border !important;
                                border-bottom: 1px solid $border !important;
                                border-radius: 0;
                                background-color: $white !important;
                            }

                            a {
                                color: $text-color;
                            }
                        }

                        &:hover {
                            border: none !important;
                            border-top: 1px solid transparent !important;
                            border-bottom: 1px solid transparent !important;
                            border-radius: 0;
                            background-color: transparent !important;
                        }
                    }

                    li:nth-child(1) {
                        &.p-tabview-selected {
                            border-top: 1px solid $white !important;
                        }
                    }
                }

                .p-tabview-panels {
                    border: none;
                    padding: 0;

                    .p-calendar {
                        padding: 20px;

                        .p-datepicker-next,
                        .p-datepicker-prev {
                            display: none;
                        }
                    }

                    .two-calendars {
                        .p-datepicker-next,
                        .p-datepicker-prev {
                            display: block;
                        }

                        td:first-child {
                            .p-calendar {
                                padding-right: $space-m;
                            }
                        }

                        td:last-child {
                            .p-calendar {
                                padding-left: $space-m;
                            }
                        }
                    }

                    .p-datepicker {
                        border: none;
                        padding: 0px;
                    }
                }
            }

            .panel-bottom {
                padding: $space-xl;
                border-top: 1.3px solid $border-blue;
                display: flex;
                align-items: center;
                justify-content: flex-end;

                .download-schedule-button {
                    height: $small-button-height;
                    width: $right-part-width - $space-xl;
                    margin-left: $space-l;
                }
            }
        }
    }
}

@media (max-width: $media-breakpoint-small-tablet) {
    download-schedule-dialog {
        .p-overlaypanel {
            .p-overlaypanel-content {
                .p-tabview {
                    flex-direction: column;

                    .p-tabview-nav {
                        border-left: none;
                        border-bottom: 1.3px solid $border-blue;

                        li {
                            margin-left: 0 !important;
                        }
                    }
                }

                .panel-bottom {
                    flex-direction: column;

                    .download-schedule-button {
                        width: 100%;
                        margin-top: $space-xl;
                        margin-left: 0 !important;
                    }
                }
            }
        }
    }
}

@media (max-width: $media-breakpoint-mobile) {
    .p-tabview-panel {
        display: flex;
        justify-content: center;
    }

    table.two-calendars {
        > tr {
            display: flex;
            flex-direction: column;
        }
    }
}
