/* Карточки привычек на вкладке "Привычки" */

.habits-card-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.habits-later-section {
  margin-top: 16px;
}

.calendar-habit-card {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
  gap: 14px;
  width: 100%;
  min-height: 138px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  border-radius: 20px;
  overflow: hidden;
}

.calendar-habit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.calendar-habit-name {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-habit-head {
  display: flex;
  align-items: center;
  width: 100%;
}

.calendar-habit-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-habit-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 62px;
}

.calendar-habit-weekday {
  color: rgba(123, 167, 255, 0.9);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
}

.calendar-habit-day {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffffd9;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.calendar-habit-day.is-today {
  position: relative;
  border: 0;
  background: var(--habit-color, #4177ff);
  color: #ffffff;
  box-shadow: none;
  overflow: visible;
}

.calendar-habit-day.is-today.is-done {
  background: var(--habit-color, #4177ff);
}

.habit-segmented-ring {
  position: absolute;
  width: 44px;
  height: 44px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

.habit-segmented-ring-segment {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 3;
  stroke-linecap: round;
}

.habit-segmented-ring.calendar-habit-ring .habit-segmented-ring-segment.is-filled {
  stroke: var(--habit-color, #4177ff);
}

.habit-solid-ring {
  position: absolute;
  width: 44px;
  height: 44px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

.habit-solid-ring-stroke {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke: rgba(255, 255, 255, 0.2);
}

.habit-solid-ring.calendar-habit-ring.is-complete .habit-solid-ring-stroke {
  stroke: var(--habit-color, #4177ff);
}

.habit-solid-ring.calendar-habit-ring.is-pending .habit-solid-ring-stroke {
  stroke: rgba(255, 255, 255, 0.24);
}

.calendar-habit-today-indicator {
  width: 4px;
  height: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-habit-card.is-completed .calendar-habit-name {
  color: #b9d6ff;
}

.completed-habit-card {
  min-height: 86px;
  height: 86px;
  padding: 14px 14px 14px 16px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.completed-habit-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.completed-habit-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.completed-habit-frequency {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.68);
  text-transform: lowercase;
}

.completed-habit-days-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.completed-habit-days-num {
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.completed-habit-days-label {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  line-height: 1;
}

.habits-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}
