// WebSocket 쿼리 진행률 패널 스타일

.query-progress-panel {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(5px);

  // 확장 모드
  &.expanded {
    .progress-content-expanded {
      padding: 2rem;
      animation: slideDown 0.3s ease;

      .progress-header {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-bottom: 0.75rem;

        .progress-title {
          font-size: 1rem;
          font-weight: 600;
          color: #212529;
          display: flex;
          align-items: center;

          i {
            color: #0d6efd;
            animation: pulse-icon 2s infinite;
            font-size: 1.1rem;
          }
        }

        .minimize-btn {
          padding: 0;
          color: #6c757d;
          text-decoration: none;
          background: transparent !important;
          border: none;
          margin-top: -0.25rem;
          line-height: 1;

          &:hover {
            color: #495057;
            background: transparent !important;
          }

          &:focus {
            box-shadow: none;
          }

          i {
            font-size: 1.2rem;
          }
        }
      }

      .progress-bar-wrapper {
        margin-bottom: 0.75rem;
        position: relative;

        .progress {
          height: 36px;
          border-radius: 8px;
          background-color: #dddddd;
          position: relative;
          overflow: hidden;

          .progress-bar {
            transition: width 0.5s ease;
            background: linear-gradient(90deg, #213079 0%, #213079 100%);
            border-radius: 8px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 60px;
            height: 100%;

            span {
              position: absolute;
              left: 50%;
              transform: translateX(-50%);
              color: white;
              font-size: 0.9rem;
              font-weight: 700;
              text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
              white-space: nowrap;
              z-index: 2;
            }
          }
        }
      }

      .progress-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        font-size: 0.85rem;

        .detail-row {
          display: flex;
          //align-items: center;
          //gap: 0.5rem;
          //padding: 0.5rem 0.75rem;
          //background: rgba(13, 110, 253, 0.05);
          //border-radius: 6px;
          //white-space: nowrap;

          i {
            color: #0d6efd;
            font-size: 1rem;
            flex-shrink: 0;
          }

          .detail-des {
            display: flex;
            align-items: center;
            white-space: nowrap;
            color: #212529;
            font-weight: 600;
            font-size: 0.85rem;
            flex: 0.4;
          }

          .detail-text {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(13, 110, 253, 0.05);
            //border-radius: 6px;
            white-space: nowrap;
            color: #212529;
            font-weight: 600;
            font-family: 'Monaco', 'Consolas', monospace;
            font-size: 0.85rem;
            flex: 0.6;
          }
        }

        @media (max-width: 600px) {
          grid-template-columns: 1fr;
        }
      }
    }
  }

  // 최소화 모드
  &.minimized {
    .progress-content-minimized {
      padding: 0.75rem 1rem;
      cursor: pointer;
      transition: background 0.2s ease;

      &:hover {
        background: rgba(13, 110, 253, 0.05);
      }

      .minimized-info {
        display: flex;
        align-items: center;
        margin-bottom: 0.4rem;
        font-size: 0.85rem;

        i {
          color: #0d6efd;
          animation: pulse-icon 2s infinite;
          font-size: 1rem;
        }

        .minimized-text {
          font-weight: 600;
          color: #212529;
        }

        small {
          font-size: 0.75rem;
        }
      }

      .minimized-progress {
        height: 6px;
        background: #e9ecef;
        border-radius: 3px;
        overflow: hidden;

        .minimized-progress-bar {
          height: 100%;
          background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
          transition: width 0.5s ease;
          animation: shimmer 1.5s infinite;
        }
      }
    }
  }
}

// 애니메이션
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-icon {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
