/* Life Routine Telegram settings */

.lr-telegram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

.lr-telegram-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(18, 22, 38, 0.96) 0%, rgba(13, 17, 31, 0.92) 100%);
  box-shadow: 0 18px 50px rgba(3, 7, 18, 0.35);
  backdrop-filter: blur(16px);
}

.lr-telegram-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lr-telegram-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.lr-telegram-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(59, 130, 246, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 1.1rem;
}

.lr-telegram-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.lr-telegram-subtitle {
  margin: 0.3rem 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.84rem;
  line-height: 1.45;
}

.lr-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.lr-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.lr-toggle-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lr-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.lr-toggle-switch input:checked + .lr-toggle-slider {
  background-color: #22c55e;
  border-color: #22c55e;
}

.lr-toggle-switch input:checked + .lr-toggle-slider:before {
  transform: translateX(24px);
}

.lr-telegram-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.95rem;
}

.lr-telegram-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lr-telegram-field-compact {
  max-width: 180px;
}

.lr-telegram-field-grow {
  flex: 1;
}

.lr-telegram-field label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lr-time-input,
.lr-textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.lr-time-input:focus,
.lr-textarea:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.lr-textarea {
  min-height: 92px;
  resize: vertical;
}

.lr-textarea::placeholder,
.lr-time-input::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.lr-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.lr-telegram-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.lr-btn {
  min-height: 46px;
  padding: 0.8rem 1.1rem;
  border: none;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lr-btn-secondary {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.28), rgba(37, 99, 235, 0.22));
  border: 1px solid rgba(129, 140, 248, 0.32);
  color: #c7d2fe;
}

.lr-btn-secondary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.38), rgba(37, 99, 235, 0.3));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.lr-last-sent {
  max-width: 210px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: right;
}

@media (max-width: 768px) {
  .lr-telegram-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .lr-telegram-card {
    padding: 1rem;
  }

  .lr-telegram-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .lr-btn {
    width: 100%;
  }

  .lr-last-sent {
    max-width: none;
    text-align: left;
  }

  .lr-telegram-field-compact {
    max-width: none;
  }
}
