.saas-attendance-group-settings {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;

  .pisell-lowcode-form-item {
    margin-bottom: 16px;
  }
}

.saas-attendance-group-settings__loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
}

.saas-attendance-group-settings__form {
  flex: 1;
  overflow: auto;
  padding: 0 16px;
}

// Tabs wrapper - sticky positioning for scroll-to-section functionality
.saas-attendance-group-settings__tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;

  // Hide tab content area since we render content outside
  .pisell-lowcode-tabs-content-holder {
    display: none;
  }
}

.saas-attendance-group-settings__tab-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.saas-attendance-group-settings .pisell-lowcode-tabs-nav {
  margin: 0;
  padding: 0 16px;
}

.saas-attendance-group-settings .pisell-lowcode-tabs-tab {
  padding: 14px 0;
}

.saas-attendance-group-settings .pisell-lowcode-tabs-content-holder {
  padding: 0;
}

.saas-attendance-group-settings__panel {
  &:not(:first-of-type) {
    margin-top: 24px;
  }
}

.saas-attendance-group-settings__section {
  margin-top: 18px;
}

.saas-attendance-group-settings__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saas-attendance-group-settings__section-title {
  font-weight: 500;
  color: #374151;
}

.saas-attendance-group-settings__members-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.saas-attendance-group-settings__members-count {
  font-size: 13px;
  color: #6b7280;
}

.saas-attendance-group-settings__link {
  padding: 0;
  height: auto;
}

.saas-attendance-group-settings__tip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__help {
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__banner {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid transparent;

  .banner-icon {
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .banner-title {
    font-size: 16px;
    line-height: 22px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
  }

  .banner-desc {
    font-size: 14px;
    line-height: 18px;
    color: #4b5563;
  }

  &.banner-blue {
    background: #eef5ff;
    border-color: #dbeafe;

    .banner-title {
      color: #1e3a8a;
    }

    .banner-desc {
      color: #1d4ed8;
    }

    svg {
      color: #2563eb;
    }
  }

  &.banner-green {
    background: #ecfdf5;
    border-color: #d1fae5;

    .banner-title {
      color: #14532d;
    }

    .banner-desc {
      color: #15803d;
    }

    svg {
      color: #16a34a;
    }
  }
}

.saas-attendance-group-settings__radio-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;

  &:first-of-type {
    margin-top: 0;
  }
}

.saas-attendance-group-settings__radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;

  &:hover {
    border-color: var(--theme-color, #5d3f9f);
    background: rgba(93, 63, 159, 0.04);
  }
}

.saas-attendance-group-settings__radio-card--selected {
  border-color: var(--theme-color, #5d3f9f);
  background: rgba(93, 63, 159, 0.08);
}

.saas-attendance-group-settings__radio-title {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #111827;
}

.saas-attendance-group-settings__radio-desc {
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__locations-box {
  margin-top: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.saas-attendance-group-settings__locations-empty {
  text-align: center;
  color: #6b7280;
}

.saas-attendance-group-settings__locations-empty-icon {
  font-size: 36px;
  color: #9ca3af;
}

.saas-attendance-group-settings__locations-empty-title {
  margin-top: 10px;
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #374151;
}

.saas-attendance-group-settings__locations-empty-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__locations-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-attendance-group-settings__location-item {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.2s ease, background-color 0.2s ease;

  &:hover {
    border-color: var(--theme-color, #5d3f9f);
    background: rgba(93, 63, 159, 0.04);
  }
}

.saas-attendance-group-settings__location-item--active {
  border-color: var(--theme-color, #5d3f9f);
  background: rgba(93, 63, 159, 0.08);
}

.saas-attendance-group-settings__location-name {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #111827;
}

.saas-attendance-group-settings__location-meta {
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.saas-attendance-group-settings__slider-row .pisell-lowcode-slider {
  flex: 1 1 auto;
}

.saas-attendance-group-settings__slider-value {
  flex: 0 0 auto;
  padding: 8px 12px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #374151;
  background: #f3f4f6;
}

.saas-attendance-group-settings__modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.saas-attendance-group-settings__modal-slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.saas-attendance-group-settings__modal-slider-row .pisell-lowcode-slider {
  flex: 1 1 auto;
}

.saas-attendance-group-settings__map-placeholder {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #6b7280;
}

.saas-attendance-group-settings__map-icon {
  font-size: 42px;
  color: #9ca3af;
}

.saas-attendance-group-settings__allow-corrections {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
}

.saas-attendance-group-settings__allow-title {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #111827;
}

.saas-attendance-group-settings__allow-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__check-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.saas-attendance-group-settings__check-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;

  &:hover {
    border-color: var(--theme-color, #5d3f9f);
    background: rgba(93, 63, 159, 0.04);
  }
}

.saas-attendance-group-settings__check-card--checked {
  border-color: var(--theme-color, #5d3f9f);
  background: rgba(93, 63, 159, 0.08);
}

.saas-attendance-group-settings__check-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saas-attendance-group-settings__check-title {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #111827;
}

.saas-attendance-group-settings__check-desc {
  font-size: 12px;
  line-height: 18px;
  color: #6b7280;
}

.saas-attendance-group-settings__inline-input {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.saas-attendance-group-settings__inline-text {
  font-size: 13px;
  line-height: 20px;
  color: #374151;
}

.saas-attendance-group-settings__custom-period {
  margin-top: 12px;
}

// Panel styles
.saas-attendance-group-settings__panel {
  // padding: 16px 16px 0px 16px;
}

// MapField styles
.saas-attendance-map-field__map-container {
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;

  capacitor-google-map {
    display: block;
    width: 100%;
    height: 100%;
  }
}

.saas-attendance-map-field__modal-map {
  height: 220px;
  overflow: hidden;

  capacitor-google-map {
    display: block;
    width: 100%;
    height: 100%;
  }
}

.saas-attendance-map-field__locations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saas-attendance-map-field__location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saas-attendance-map-field__location-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.saas-attendance-map-field__edit-btn {
  color: #9ca3af;
  transition: color 0.2s ease;

  &:hover {
    color: #7f56d9;
  }
}

.saas-attendance-map-field__delete-btn {
  color: #9ca3af;
  transition: color 0.2s ease;

  &:hover {
    color: #ef4444;
  }
}
