/**
 * The following CSS is the default to display MyClub groups calendars.
 */

.myclub-groups-calendar {
  position: relative;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;

  .myclub-groups-calendar-container {
    width: 100%;
  }

  .calendar-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0, 0.3);
    justify-content: center;
    align-items: center;

    &.modal-open {
      display: flex;
    }

    .modal-content {
      width: 500px;
      background-color: #fff;
      border-radius: 8px;
      padding: 20px;

      .close {
        font-size: 28px;
        font-weight: bold;
        float: right;
        cursor: pointer;
      }

      .modal-body {
        .name {
          font-size: larger;
          font-weight: bold;
          margin-top: 1rem;
          margin-bottom: 1rem;
        }

        table {
          width: 100%;
          border-collapse: collapse;

          tr {
            border-bottom: 1px solid #ccc;

            th, td {
              font-size: smaller;
              padding: 1rem 0;
              text-align: left;
            }

            th {
              font-weight: bold;
              vertical-align: top;
            }

            &.description-row {
              td {
                max-height: 180px;
              }

              .description-content {
                max-height: 180px;
                overflow-y: auto;
                display: block;
                padding-right: 6px;
              }
            }
          }
        }
      }
    }
  }

  .fc {
    .fc-list-event-graphic {
      display: none;
    }

    .fc-list-event-title {
      .fc-event-title {
        border-radius: 6px;
        padding: 4px 0;
      }
    }

    .fc-event-title {
      white-space: normal !important;
      word-wrap: normal !important;
      display: block !important;
      cursor: pointer;
      font-size: 0.8rem;
      color: #fff;

      &.yellow {
        background-color: #9e8c39;
        border-color: #9e8c39;
      }

      &.red {
        background-color: #c1272d;
        border-color: #c1272d;
      }

      &.green {
        background-color: #009245;
        border-color: #009245;
      }

      &.blue {
        background-color: #396b9e;
        border-color: #396b9e;
      }
    }

    .fc-button-primary {
      background-color: transparent!important;
      border-color: transparent!important;
      border-width: 1px!important;
      color: rgb(33, 32, 46)!important;

      &:not(:disabled).fc-button-active, &:not(:disabled):active {
        background-color: #1a252f!important;
        border-color: #151e27!important;
        color: #fff!important;
      }
    }
  }

  .myclub-groups-subscribe-button-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
  }

  .myclub-groups-subscribe-button {
    align-items: center;
    background-color: transparent;
    border: 1px solid #21201e;
    border-radius: 4px;
    color: #21201e;
    cursor: pointer;
    display: flex;
    font-size: 0.9rem;
    gap: 0.4rem;
    padding: 0.4rem 1rem;

    .dashicons {
      font-size: 1rem;
      height: 1rem;
      width: 1rem;
    }

    &:hover {
      background-color: #21201e;
      color: #fff;
    }
  }

  .subscribe-modal-content {
    max-width: 560px;
    width: 90%;
  }

  .subscribe-modal-body {
    display: block;

    .subscribe-modal-title {
      font-size: 1.2rem;
      font-weight: bold;
      margin-bottom: 1.2rem;
    }

    .subscribe-platform {
      margin-bottom: 1.2rem;

      .subscribe-platform-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.4rem;

        .subscribe-platform-icon {
          height: 24px;
          width: 24px;
        }
      }

      ol {
        margin: 0.4rem 0 0 1.2rem;
        padding: 0;

        li {
          font-size: 0.9rem;
          margin-bottom: 0.2rem;
          word-break: break-all;
        }
      }

      p {
        font-size: 0.9rem;
        margin: 0.4rem 0 0;
      }

      a {
        word-break: break-all;
      }
    }
  }

  .myclub-groups-event-time {
    text-align: center;
    width: 100%;
  }

  .myclub-groups-event-title {
    font-weight: bold;
    word-wrap: normal;
    text-align: center;
    width: 100%;
  }
}

@media (min-width: 996px) {
  .myclub-groups-calendar {
    .myclub-groups-calendar-container {
      max-width: 996px;
    }
  }
}

@media (min-width: 1200px) {
  .myclub-groups-calendar {
    .myclub-groups-calendar-container {
      max-width: 1200px;
    }
  }
}