// This file is part of Indico.
// Copyright (C) 2002 - 2026 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.

@use 'base/palette' as *;
@use 'rb:styles/responsive' as *;

.banner.user-dashboard,
.user-dashboard {
  margin-left: auto;
  margin-right: auto;
  max-width: 90%;
  display: flex;

  @media (max-width: $wide-screen-width) {
    max-width: 100%;
  }

  & > .page-content {
    width: 100%;
  }
}

.banner.user-dashboard {
  justify-content: space-between;
}

.dashboard-tab {
  margin-top: 2em;
}

.quick-access-pane {
  @media (min-width: $computer-width) {
    display: flex;
  }
}

.dashboard-col {
  @media (min-width: $computer-width) {
    width: 50%;
  }
  vertical-align: top;
}

.dashboard-col:last-child {
  @media (min-width: $computer-width) {
    padding-left: 10px;
  }
}

.dashboard-col:first-child {
  @media (min-width: $computer-width) {
    padding-right: 10px;
    padding-left: 0;
  }
}

.dashboard-box {
  border: 1px solid #ddd;
  border-radius: 0.3em;
  margin-bottom: 44px;
}

.dashboard-box h3 {
  background: #f7f7f7;
  border-bottom: 1px solid #ddd;
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
  font-size: 14px;
  line-height: 100%;
  margin: 0;
  padding: 10px;
}

.dashboard-box.suggestions h3 {
  background: #dcebf5;
}

.dashboard-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: none;
}

.dashboard-box ul li {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 10px 5px 10px;
}

.dashboard-box ul li a,
.dashboard-box ul li.no-event span {
  font-size: 1.2em;
  line-height: 18px;
  position: relative;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.dashboard-box.suggestions ul li > a {
  margin-right: 15px;
}

.dashboard-box ul li .actions {
  font-size: 10px;
  padding: 0 0 5px 10px;
}

.dashboard-box ul li .actions a:hover span {
  text-decoration: underline;
}

.dashboard-box.suggestions ul .item-legend {
  display: none;
}

.dashboard-box ul li:last-child > a,
.dashboard-box ul li.no-event:last-child span {
  border-bottom: none;
}

.dashboard-box ul li > a:hover .event-title {
  text-decoration: underline;
}

.dashboard-box ul .event-title {
  vertical-align: middle;
}

.dashboard-box ul .event-date,
.dashboard-box ul .event-category {
  color: $dark-gray;
  display: inline-block;
  font-weight: normal;
  vertical-align: middle;
}

.dashboard-box ul .event-date {
  display: inline-block;
  font-size: 12px;
  width: 95px;
}

.dashboard-box ul .event-category {
  display: block;
  font-size: 0.8em;
}

.dashboard-box ul .item-legend {
  max-width: 150px;
  position: relative;
  float: right;
}

.dashboard-box ul li .close-box {
  display: none;
  font-size: 18px;
  position: absolute;
  right: 0;
  top: 0;
  margin: 10px 10px 0 0;
}

.dashboard-box ul li:hover .close-box {
  display: inline-block;
}

.item-legend [class*='icon-'] {
  color: #ddd;
  font-size: 18px;
}

.item-legend [class*='icon-'].active {
  color: #777;
}

.your-details {
  display: flex;
  flex-flow: row nowrap;
  margin-bottom: 15px;

  .avatar-image {
    display: none;

    @media (min-width: $tablet-width) {
      display: block;
    }

    .ui.label {
      color: $light-gray;
      margin-right: 34px;

      &.default-avatar {
        font-size: 70px;
      }

      &:not(.default-avatar) {
        height: 140px;
      }
    }
  }

  .your-details-wrapper {
    color: $black;
    font-size: 1.2em;
    line-height: 1.5;
    max-width: 300px;
    margin-right: 5px;

    h3 {
      margin-top: 0;
      margin-bottom: 10px;
    }

    i {
      color: $dark-gray;
      margin-right: 10px;
    }

    .your-labels {
      display: flex;
      flex-flow: row wrap;
      margin-bottom: 1rem;

      .label {
        margin: 0 7px 7px 0;
      }
    }
  }

  .actions {
    flex-shrink: 0;
    margin-left: auto;
  }
}
