/* logo.css - Logo CSS thuần cho Occ.Asia */

/* Logo chính */
.occ-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.6rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.occ-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 2px 8px rgba(102,126,234,0.3));
}

/* Logo icon (vòng tròn) */
.occ-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 4px 15px rgba(102,126,234,0.3);
  transition: all 0.3s ease;
}

.occ-icon::before {
  content: "🌏";
  font-size: 1.8rem;
  position: absolute;
  transition: transform 0.3s ease;
}

.occ-icon:hover::before {
  transform: rotate(15deg);
}

.occ-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f59e0b);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.occ-icon:hover::after {
  opacity: 1;
}

/* Logo text với animation */
.occ-text {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea, #764ba2, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.occ-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  margin: 0 2px;
  animation: pulse 1.5s infinite;
}

.occ-dot:nth-child(2) { animation-delay: 0.3s; }
.occ-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Logo cho header */
.occ-logo-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo mini (cho favicon alternative) */
.occ-icon-mini {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 8px;
  position: relative;
}

.occ-icon-mini::before {
  content: "🌏";
  font-size: 0.9rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Loading spinner logo */
.occ-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102,126,234,0.2);
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Thêm vào logo.css để tạo favicon thay thế */
.favicon-emojix {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    text-align: center;
    line-height: 32px;
    font-size: 20px;
}

/* Thêm vào cuối file logo.css */

/* Fix chiều cao cho PWA - Khắc phục lỗi ô nhập text bị tụt */
html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Đảm bảo container messages chiếm đúng không gian */
.messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* Fix input area luôn hiển thị ở dưới cùng */
.input-area {
    flex-shrink: 0;
    margin-bottom: env(safe-area-inset-bottom, 0);
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

/* Đảm bảo header không bị che */
.header {
    flex-shrink: 0;
    padding-top: env(safe-area-inset-top, 10px);
}

/* Fix cho iOS */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }
    .input-area {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
}


/* Responsive logo */
@media (max-width: 768px) {
  .occ-logo {
    font-size: 1.2rem;
  }
  .occ-text {
    font-size: 1.1rem;
  }
  .occ-icon {
    width: 36px;
    height: 36px;
  }
  .occ-icon::before {
    font-size: 1.3rem;
  }
}