﻿.group {
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 5px 5px 0 0;
}

.group-content {
  display: block;
  /*background-color: #fafafa;*/
  padding: 0 0 10px 20px;
  /*padding: 15px;
  border-top: 1px solid #ccc;*/
  border-radius: 0 0 5px 5px;
}

.group-content-list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.checkbox-label {
  display: flex;
  align-items: center;
  /*margin-bottom: 10px;*/
  padding: 5px 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.checkbox-all-label {
  display: flex;
  align-items: center;
  /*padding: 5px 10px;*/
  background-color: #f0f0f0;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.checkbox-label:hover {
  background-color: #f9f9f9;
}

#list input[type="checkbox"] {
  margin-right: 8px;
  height: 16px;
  width: 16px;
}

.template-link {
  color: #666;
  font-weight: bold;
}

div.ngdialog.cycle-template-list .ngdialog-content {
  width: 800px;
  max-height: 80vh; /* 화면 높이의 80%로 제한 */
  background-color: #fff;
  overflow: hidden; /* 팝업 자체의 스크롤 방지 */
}

/* 새로운 템플릿 박스 스타일 */
.template-case-box {
  margin-bottom: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.case-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #dee2e6;
}

.case-header:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.case-toggle-icon {
  font-size: 12px;
  color: #666;
  transition: transform 0.3s ease;
  display: inline-block;
}

.case-toggle-icon.expanded {
  transform: rotate(90deg);
}

.case-select-all {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.case-select-all input[type="checkbox"] {
  margin-right: 5px;
  width: 14px;
  height: 14px;
}

.case-content {
  padding: 20px;
  background-color: #fafbfc;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 15px;
}
/*
.template-item {
  background-color: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
  position: relative;
  min-height: 80px;
}

.template-item:hover {
  border-color: #007bff;
  box-shadow: 0 4px 8px rgba(0,123,255,0.15);
  transform: translateY(-2px);
}

.template-item.selected {
  border-color: #28a745;
  background-color: #f8fff9;
  box-shadow: 0 4px 8px rgba(40,167,69,0.15);
}

.template-item.disabled {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  cursor: not-allowed;
  opacity: 0.6;
}

.template-item.disabled:hover {
  transform: none;
  box-shadow: none;
}*/

.template-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.template-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 10px;
  word-break: break-word;
}

.template-status {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.selected-badge {
  background-color: #28a745;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.disabled-badge {
  background-color: #6c757d;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.template-actions {
  /* padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6; */
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-actions .btn {
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.template-actions .btn-primary {
  background-color: #007bff;
  border-color: #007bff;
  color: white;
}

.template-actions .btn-primary:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.template-actions .btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.template-actions .btn-secondary:hover {
  background-color: #545b62;
  border-color: #545b62;
}

.loader-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 300px;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid #666;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
} 