/* 정규식 생성기 스타일 */

/* 탭 관련 스타일 */
.tab-container {
    overflow: hidden;
  }
  
  .tabs {
    display: flex;
    padding: 0;
    border-bottom: none;
  }
  
  .tab {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--gray-600);
    display: flex;
    align-items: center;
  }
  
  .tab i {
    margin-right: 0.5rem;
  }
  
  .tab.active {
    color: var(--primary);
    background-color: white;
    border-bottom: 2px solid var(--primary);
  }
  
  .tab-content {
    display: none;
  }
  
  .tab-content.active {
    display: block;
  }
  
  /* 토글 컨테이너 */
  .toggle-container {
    display: flex;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
  }
  
  .toggle-option {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--gray-100);
    color: var(--gray-700);
  }
  
  .toggle-option.active {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
  }
  
  /* 빌더 모드 */
  .builder-mode {
    display: none;
  }
  
  .builder-mode.active {
    display: block;
  }
  
  /* 위자드 스타일 */
  .wizard-step {
    display: none;
    animation: fadeIn 0.3s ease;
  }
  
  .wizard-step.active {
    display: block;
  }
  
  .wizard-step h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.25rem;
  }
  
  .wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
  }
  
  .pattern-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .pattern-type {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .pattern-type i {
    font-size: 1.5rem;
    color: var(--primary);
  }
  
  .pattern-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
  }
  
  .pattern-type.selected {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  
  /* 플래그 스타일 */
  .checkbox-group {
    margin-top: 0.5rem;
  }
  
  .flag-name {
    font-weight: 600;
    margin-right: 0.5rem;
  }
  
  .flag-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
  }
  
  /* 컴포넌트 모드 스타일 */
  .regex-components {
    display: flex;
    gap: 1.5rem;
  }
  
  .component-groups {
    flex: 1;
    max-width: 450px;
  }
  
  .component-group {
    margin-bottom: 1.5rem;
  }
  
  .component-group h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-300);
    padding-bottom: 0.5rem;
  }
  
  .component-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .component-item {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-family: "Courier New", monospace;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .component-item:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
  }
  
  .component-editor {
    flex: 1;
    min-width: 0;
  }
  
  .editor-container {
    position: relative;
  }
  
  .editor-controls {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
  }
  
  .btn-icon {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
  }
  
  .btn-icon:hover {
    color: var(--primary);
    background-color: rgba(0, 0, 0, 0.05);
  }
  
  .component-description {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    min-height: 24px;
  }
  
  .flag-buttons {
    display: flex;
    gap: 0.5rem;
  }
  
  .flag-button {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Courier New", monospace;
    font-weight: bold;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background-color: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .flag-button:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
  }
  
  .flag-button.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  
  /* 결과 섹션 */
  .result-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-300);
  }
  
  .result-section h3 {
    margin-bottom: 1rem;
    color: var(--gray-700);
  }
  
  .regex-result {
    position: relative;
    margin-bottom: 1rem;
  }
  
  .regex-display {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: "Courier New", monospace;
    color: var(--primary);
    word-break: break-all;
  }
  
  .regex-explanation {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  /* 빠른 테스트 */
  .quick-test {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--gray-300);
  }
  
  .quick-test-result {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 3rem;
    margin-top: 1rem;
  }
  
  /* 테스터 탭 스타일 */
  .input-group {
    display: flex;
    align-items: center;
  }
  
  .input-group-text {
    background-color: var(--gray-200);
    border: 1px solid var(--gray-400);
    padding: 0.7rem 1rem;
    color: var(--gray-700);
  }
  
  .flags-input {
    max-width: 80px;
  }
  
  .test-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .test-results-container {
    margin-top: 1.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
  }
  
  .test-results-container h3 {
    padding: 1rem;
    margin: 0;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
  }
  
  .test-result-tabs {
    background-color: var(--gray-200);
    border-bottom: 1px solid var(--gray-300);
  }
  
  .test-result-content {
    padding: 1rem;
    display: none;
  }
  
  .test-result-content.active {
    display: block;
  }
  
  .matches-container,
  .detail-container,
  .highlight-container {
    min-height: 100px;
  }
  
  .highlight-text {
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.5;
  }
  
  .highlight-match {
    background-color: rgba(var(--primary-rgb), 0.2);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 2px;
  }
  
  /* 패턴 라이브러리 스타일 */
  .search-bar {
    margin-bottom: 1.5rem;
  }
  
  .pattern-categories {
    margin-bottom: 1.5rem;
  }
  
  .category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .category {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    background-color: var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .category:hover {
    background-color: var(--gray-300);
  }
  
  .category.active {
    background-color: var(--primary);
    color: white;
  }
  
  .pattern-card {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
  }
  
  .pattern-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
  }
  
  .pattern-header {
    padding: 1rem;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
  }
  
  .pattern-title {
    font-weight: 600;
  }
  
  .pattern-category {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    background-color: var(--gray-200);
    border-radius: 4px;
    color: var(--gray-700);
  }
  
  .pattern-body {
    padding: 1rem;
  }
  
  .pattern-regex {
    font-family: "Courier New", monospace;
    background-color: var(--gray-800);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
  }
  
  .pattern-description {
    font-size: 0.9rem;
    color: var(--gray-700);
  }
  
  .pattern-footer {
    padding: 0.75rem 1rem;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-300);
    display: flex;
    justify-content: flex-end;
  }
  
  /* 치트 시트 스타일 */
  .cheatsheet-content {
    margin-top: 1.5rem;
  }
  
  .cheatsheet-section {
    margin-bottom: 2rem;
  }
  
  .cheatsheet-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-300);
  }
  
  .cheatsheet-table {
    width: 100%;
    border-collapse: collapse;
  }
  
  .cheatsheet-table th,
  .cheatsheet-table td {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
  }
  
  .cheatsheet-table th {
    background-color: var(--gray-100);
    text-align: left;
  }
  
  .syntax-code {
    font-family: "Courier New", monospace;
    background-color: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
  }
  
  /* 미디어 쿼리 */
  @media (max-width: 992px) {
    .regex-components {
      flex-direction: column;
    }
    
    .component-groups {
      max-width: 100%;
    }
  }
  
  @media (max-width: 768px) {
    .pattern-types {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .tabs {
      flex-wrap: wrap;
    }
    
    .tab {
      padding: 0.75rem 1rem;
    }
  }
  
  @media (max-width: 576px) {
    .component-items {
      gap: 0.3rem;
    }
    
    .component-item {
      font-size: 0.9rem;
      padding: 0.3rem 0.5rem;
    }
    
    .pattern-types {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .test-controls {
      flex-direction: column;
    }
    
    .test-controls .btn {
      width: 100%;
    }
  }