.calendar-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 0;
  position: relative;

  &__loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--c--theme--colors--greyscale-000);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    p {
      margin: 0;
      color: var(--c--theme--colors--greyscale-600);
    }
  }

  &__container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
  }

  &--loading,
  &--error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    padding: 2rem;
    text-align: center;

    p {
      color: var(--c--theme--colors--greyscale-600);
      margin: 0;
    }

    button {
      padding: 0.5rem 1rem;
      background: var(--c--theme--colors--primary-500);
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;

      &:hover {
        background: var(--c--theme--colors--primary-600);
      }
    }
  }
}

// Open-calendar overrides to match La Suite theme
.calendar-view__container {
  // Calendar toolbar
  .ec-toolbar {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--c--theme--colors--greyscale-200);
    background: var(--c--theme--colors--greyscale-000);
  }

  // Today button
  .ec-button {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--c--theme--colors--greyscale-300);
    background: var(--c--theme--colors--greyscale-000);
    color: var(--c--theme--colors--greyscale-800);
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      background: var(--c--theme--colors--greyscale-100);
    }

    &.ec-active {
      background: var(--c--theme--colors--primary-500);
      border-color: var(--c--theme--colors--primary-500);
      color: white;
    }
  }

  // Navigation buttons
  .ec-prev,
  .ec-next {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }

  // Title
  .ec-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--c--theme--colors--greyscale-900);
    text-transform: capitalize;
  }

  // Days header
  .ec-days,
  .ec-day {
    border-color: var(--c--theme--colors--greyscale-200);
  }

  .ec-day-head {
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--c--theme--colors--greyscale-600);
  }

  // Time slots
  .ec-time {
    font-size: 0.75rem;
    color: var(--c--theme--colors--greyscale-500);
  }

  // Events
  .ec-event {
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 2px 4px;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);

    &:hover {
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }
  }

  // Today highlight
  .ec-today {
    background: rgba(var(--c--theme--colors--primary-rgb, 49, 116, 173), 0.1);
  }

  // Now indicator
  .ec-now-indicator {
    border-color: var(--c--theme--colors--danger-500);

    &::before {
      background: var(--c--theme--colors--danger-500);
    }
  }

  // Popup styles
  .ec-popup {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--c--theme--colors--greyscale-200);
  }
}
