/* Footer 스타일 */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: black;
  height: 2rem;
  box-sizing: border-box;
}

.footer a {
  font-size: small;
  color: white;
  text-decoration: none;
}

/* 3등분 레이아웃 구현 */
.license-info-container {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.copyright {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.placeholder {
  flex: 1;
}

/* 라이센스 정보 스타일 */
.license-info {
  display: flex;
  align-items: center;
  font-size: small;
  color: white;
  margin-right: 10px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.license-info:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.license-days {
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-weight: bold;
  margin-right: 10px;
}

/* 라이센스 상태별 스타일 */
.license-active .license-days {
  background-color: #28a745;
  color: white;
}

.license-warning .license-days {
  background-color: #ffc107;
  color: black;
}

.license-expired .license-days {
  background-color: #dc3545;
  color: white;
}

/* 툴팁 스타일 */
[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 24px;
  right: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* 라이센스 상태별 툴팁 스타일 변경 */
.license-warning[title]:hover::after {
  background-color: rgba(255, 193, 7, 0.9);
  color: black;
}

.license-expired[title]:hover::after {
  background-color: rgba(220, 53, 69, 0.9);
  color: white;
}

/* 애니메이션 효과 */
.license-expired .license-days {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 라이센스 만료일 관련 스타일 */
#license-expiry {
  margin-right: 10px;
}

/* 라이센스 텍스트 레이블 (모바일에서 숨김) */
.license-text-label {
  margin-right: 5px;
}

/* 태블릿 반응형 (1024px 이하) */
@media (max-width: 1024px) {
  .footer {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
  
  .footer a {
    font-size: 0.8rem;
  }
  
  /* Copyright를 좌측으로 이동 */
  .copyright {
    justify-content: flex-start;
    order: -1; /* 가장 앞으로 이동 */
  }
  
  .placeholder {
    flex: 0.5;
  }
  
  .license-info-container {
    flex: 1.5;
  }
  
  .license-info {
    font-size: 0.8rem;
    margin-right: 8px;
  }
  
  .license-days {
    padding: 0.15rem 0.4rem;
    margin-right: 8px;
    font-size: 0.75rem;
  }
  
  /* 툴팁 크기 조정 */
  [title]:hover::after {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* 모바일 반응형 (768px 이하) */
@media (max-width: 768px) {
  .footer {
    padding: 0.5rem;
    font-size: 0.8rem;
    flex-direction: row;
    justify-content: space-between;
  }
  
  .footer a {
    font-size: 0.7rem;
  }
  
  /* Copyright 좌측 고정 */
  .copyright {
    flex: 1;
    justify-content: flex-start;
    order: -1;
  }
  
  .placeholder {
    display: none; /* 모바일에서는 placeholder 숨김 */
  }
  
  .license-info-container {
    flex: 1;
    justify-content: flex-end;
  }
  
  /* 라이센스 텍스트 레이블 숨김 */
  .license-text-label {
    display: none;
  }
  
  .license-info {
    font-size: 0.7rem;
    margin-right: 5px;
  }
  
  .license-days {
    padding: 0.1rem 0.3rem;
    margin-right: 5px;
    font-size: 0.7rem;
  }
  
  /* 툴팁 더 작게 */
  [title]:hover::after {
    font-size: 9px;
    padding: 3px 6px;
    bottom: 20px;
  }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
  .footer {
    padding: 0.4rem;
    height: 1.8rem;
  }
  
  .footer a {
    font-size: 0.65rem;
  }
  
  .copyright {
    font-size: 0.65rem;
  }
  
  .license-info {
    font-size: 0.65rem;
    margin-right: 3px;
  }
  
  .license-days {
    padding: 0.1rem 0.25rem;
    margin-right: 3px;
    font-size: 0.65rem;
  }
  
  /* 매우 작은 화면에서는 툴팁 위치 조정 */
  [title]:hover::after {
    font-size: 8px;
    padding: 2px 4px;
    bottom: 18px;
    right: -5px;
  }
}