@import '@/styles/responsive.scss';

.calendarWrapper {
  .calendar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    // max-width: 350px;
    background: white;
    padding: 16px;
    width: 100% !important;

    @include tablet {
      max-width: 400px;
    }

    // Navigation area
    .react-calendar__navigation {
      display: flex;
      margin-bottom: 16px;

      button {
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.2s ease;
        cursor: pointer;
        border: none;
        background: none;
        padding: 8px;
        color: #333;

        &:hover {
          color: #30713a;
        }

        &:disabled {
          opacity: 0.3;
          cursor: not-allowed;
        }
      }

      .react-calendar__navigation__label {
        flex-grow: 1;
        font-weight: 600;
        font-size: 16px;
      }
    }

    // Weekday headers
    .react-calendar__month-view__weekdays {
      margin-bottom: 8px;
      color: #666;
      font-weight: 600;
      font-size: 12px;
      text-align: center;
      text-transform: uppercase;

      abbr {
        text-decoration: none;
      }
    }

    // Calendar grid
    .react-calendar__month-view__days {
      display: grid !important;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;

      .tile {
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.2s ease;
        cursor: pointer;
        border: none;
        border-radius: 8px;
        background: none;
        aspect-ratio: 1;
        color: #333;
        font-size: 14px;

        &:hover:not(:disabled) {
          background: rgba(48, 113, 58, 0.1);
        }

        &:disabled {
          cursor: not-allowed;
          color: #ccc;
        }

        &.selected {
          background: #30713a;
          color: white;
          font-weight: 600;
        }

        &.today {
          border: 2px solid #30713a;
          font-weight: 600;

          &.selected {
            border-color: white;
          }
        }
      }
    }
  }
}
