/* ===========================
   Root variables
   =========================== */
:root {
  --primary-color: #1062fe;
  --hover-color: #009aff;
  --telegram-color: #2CA5E0;
  --telegram-hover-color: #1a92cc;
  --whatsapp-color: #25D366;
  --whatsapp-hover-color: #1DA851;
  --livechat-color: #007bff;
  --livechat-hover-color: #0069d9;
  --text-color-dark: #333;
  --text-color-light: white;
  --button-shadow: 0 6px 12px rgba(0,0,0,0.25);
  --sub-button-shadow: 0 4px 10px rgba(0,0,0,0.1);
  --transition-speed: 0.3s;
}

/* ===========================
   Body settings
   =========================== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===========================
   Floating buttons container
   =========================== */
.floating-buttons {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: bottom var(--transition-speed) ease, right var(--transition-speed) ease;
}

/* ===========================
   Desktop styles
   =========================== */
@media (min-width: 992px) {
  /* Move desktop floating buttons up by additional 200px */
  .floating-buttons {
    bottom: 350px !important; /* previous 150px + 200px */
    right: 30px !important;
  }

  /* Main rectangular button */
  .main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px; /* default height */
    padding: 0 25px;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--button-shadow);
    transition: background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease, filter var(--transition-speed) ease;
    white-space: nowrap;
  }

  /* Hover glow effect */
  .main-button:hover {
    box-shadow: 0 15px 35px rgba(16,98,254,0.6), 0 0 20px rgba(16,98,254,0.4);
    transform: scale(1.05);
    filter: brightness(1.05);
  }

  .main-button.active {
    background-color: var(--hover-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    transform: scale(1.05);
  }

  .main-button .button-icon {
    margin-right: 12px;
    font-size: 20px;
  }

  /* Submenu buttons positioned above main button */
  .submenu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
    width: max-content;
    align-items: center;
  }

  .submenu.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* Submenu buttons styling */
  .sub-button {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--text-color-light);
    color: var(--text-color-dark);
    text-decoration: none;
    border-radius: 28px;
    box-shadow: var(--sub-button-shadow);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  }

  .sub-button i {
    margin-right: 12px;
    font-size: 20px;
  }

  .sub-button:hover {
    background-color: #f0f2f5;
    transform: translateX(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  }

  /* Submenu button colours */
  .sub-button.telegram { background-color: var(--telegram-color); color: var(--text-color-light); }
  .sub-button.telegram:hover { background-color: var(--telegram-hover-color); }
  .sub-button.live-chat { background-color: var(--livechat-color); color: var(--text-color-light); }
  .sub-button.live-chat:hover { background-color: var(--livechat-hover-color); }
  .sub-button.whatsapp { background-color: var(--whatsapp-color); color: var(--text-color-light); }
  .sub-button.whatsapp:hover { background-color: var(--whatsapp-hover-color); }
}

/* ===========================
   Mobile & Tablet styles (unchanged)
   =========================== */
@media (max-width: 991px) {
  .floating-buttons {
    bottom: 20px;
    right: 20px;
  }

  .main-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    border: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--button-shadow);
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
  }

  .main-button.active {
    transform: rotate(45deg);
    background-color: var(--hover-color);
  }

  .main-button .button-text {
    display: none;
  }

  .submenu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
    align-items: center;
  }

  .submenu.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .sub-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    max-width: 180px;
    padding: 8px 14px;
    border-radius: 22px;
    font-size: clamp(10px, 3.5vw, 13px);
    font-weight: 600;
    letter-spacing: 0.3px;
    background-color: var(--text-color-light);
    color: var(--text-color-dark);
    box-shadow: var(--sub-button-shadow);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-decoration: none;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
  }

  .sub-button i {
    display: none;
  }

  .sub-button:hover {
    background-color: #f0f2f5;
    transform: translateX(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  }

  .sub-button.telegram { background-color: var(--telegram-color); color: var(--text-color-light); }
  .sub-button.live-chat { background-color: var(--livechat-color); color: var(--text-color-light); }
  .sub-button.whatsapp { background-color: var(--whatsapp-color); color: var(--text-color-light); }
}
