/* ==================================================
📁 floating-icons.css – Floating Contact Icons
Theme: NgTheVinh
================================================== */


/* ================================================
📌 1. FLOATING ICONS – Vị trí và bố cục
================================================ */
#floating-contacts {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 999;
}


/* ================================================
📌 2. ICON STYLE – Giao diện từng nút liên hệ
================================================ */
.contact-icon {
  display: flex;
  align-items: center;
  background-color: var(--primary-color, #333);
  color: #fff;
  padding: 0.3em 0.8em 0.3em 0.3em;
  border-radius: 30px 0 0 30px;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.3s ease;
  position: relative;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.contact-icon i {
  font-size: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5em;
}


/* Màu nền riêng cho từng loại */
.email-icon {
  background-color: var(--secondary-color);
}

.phone-icon {
  background-color: #249800;
}

.zalo-icon {
  background-color: #006AF5;
}

.zalo-svg-icon {
  display: inline-block;
  vertical-align: middle;
  width: 1.625rem;
  height: 1.625rem;
  margin-right: 8px;
}


/* ================================================
📌 3. HOVER EFFECT – Hiệu ứng khi hover
================================================ */
.contact-icon:hover {
  transform: translateX(-5px);
}

.contact-icon::after {
  content: '';
  position: absolute;
  top: 0;
  right: -5px;
  width: 5px;
  height: 100%;
  background-color: inherit;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}


/* ================================================
📌 4. LABEL – Text bên phải icon
================================================ */
.contact-label {
  display: inline-block;
  white-space: nowrap;
}


/* ================================================
📌 5. BACK TO TOP – Tách riêng 2 phiên bản
================================================ */
/* Mặc định (PC ≥ 1441px) */
.responsive-only {
  display: none;
}

.desktop-only {
  display: flex;
  position: fixed;
  bottom: 0.7rem;
  right: 2rem;
  z-index: 999;
  background-color: var(--primary-color, #333);
  color: #fff;
  border-radius: 50%;
  padding: 0.65rem;
  opacity: 0.25;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.desktop-only:hover {
  opacity: 1;
}

.desktop-only i {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop-only .contact-label {
  display: none;
}


/* ================================================
📱 6. RESPONSIVE – Standard Desktop (≤ 1440px)
================================================ */
@media screen and (max-width: 1440px) {
  #floating-contacts {
    top: auto;
    bottom: 0.5rem;
    right: 5%;
    transform: none;
    flex-direction: row;
    gap: 0.75rem;
  }

  .email-icon,
  .contact-label,
  .contact-icon::after {
    display: none;
  }

  .contact-icon {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    background-color: var(--primary-color, #333);
    position: relative;
    transition: transform 0.1s ease;
  }

  .contact-icon i {
    font-size: 1.25rem;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  }

  .phone-icon i {
    background-color: #249800;
  }

  .zalo-svg-icon {
    width: 1.75rem;
    height: 1.75rem;
    margin: 0;
    display: block;
    object-fit: contain;
  }

  .contact-icon:hover {
    transform: scale(1.05);
  }

  .responsive-only {
    display: flex;
    background-color: var(--secondary-color);
  }

  .desktop-only {
    display: none;
  }
}


/* ================================================
📱 7. RESPONSIVE – Mobile (≤ 768px)
================================================ */
@media (max-width: 768px) {
  #floating-contacts {
    bottom: 1.25rem;
  }
}
