/* ========================================= */
/* UTILITY COMPONENTS */
/* Back to Top, Popups, Progress Bars, etc. */
/* ========================================= */

/* ========================================= */
/* BACK TO TOP BUTTON */
/* ========================================= */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    rgba(20, 20, 32, 0.98),
    rgba(10, 10, 15, 0.98)
  );
  border: 1px solid var(--dark-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed);
  z-index: 1001;
  box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  border-color: var(--primary-neon);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  color: var(--primary-neon);
  filter: drop-shadow(0 0 3px var(--primary-neon));
}

/* Pulse ring animation */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary-neon);
  border-radius: 50%;
  opacity: 0;
}

.back-to-top:hover .pulse-ring {
  animation: pulse-ring 1s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================= */
/* SCROLL PROGRESS BAR */
/* ========================================= */

.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--dark-border);
  z-index: 10000;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--primary-neon),
    var(--secondary-neon)
  );
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--primary-neon);
}

/* ========================================= */
/* POPUP FORMS */
/* ========================================= */

/* Popup styling */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0); /* Start small */
  width: 450px;
  max-width: 90%; /* Ensure it fits on smaller screens */
  padding: 1.5rem;
  background-color: white;
  border: 15px solid var(--primary-color);
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: none; /* Hidden by default */
  z-index: 1000;
  text-align: center;
  animation: popup-intro 0.5s ease-in-out forwards; /* Add intro animation */
}

.popup.show {
  display: block; /* Ensure it's visible */
}

.popup p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

/* ------------------------------------
   Form Elements
   ------------------------------------ */
.popup form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.popup label {
  color: black;
  font-size: 0.9rem;
  text-align: left;
}

.popup input,
.popup textarea {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box; /* Include padding in width */
}

.popup textarea {
  resize: vertical; /* Allow resizing only vertically */
  min-height: 80px; /* Minimum height for the textarea */
}

.popup button {
  font-family: 'Exo';
  font-weight: 700;
  padding: 0.5rem;
  font-size: 1rem;
  background-color: black; /* Fallback for primary color */
  color: white;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.popup button:hover {
  background-color: var(--primary-color);
  border: 2px solid black;
}

/* Close Button Styling */
#close-popup {
  border: none;
  margin-top: 1rem;
  background-color: #cc0000;
  color: white;
}

#close-popup:hover {
  background-color: #990000;
}

/* ------------------------------------
   Animations
   ------------------------------------ */
/* Keyframes for the intro animation */
@keyframes popup-intro {
  0% {
    opacity: 0; /* Fully transparent */
    transform: translate(-50%, -50%) scale(0); /* Start small */
  }
  100% {
    opacity: 1; /* Fully visible */
    transform: translate(-50%, -50%) scale(1); /* Expand to full size */
  }
}

/* ========================================= */
/* RESPONSIVE PHONE NUMBER */
/* ========================================= */
.responsive-phone-num {
  position: fixed;
  left: 20px;
  height: 40px;
  max-height: 40px;
  background-color: rgba(18, 24, 39, 0.8);
  color: white;
  padding: 11px 12px 5px 12px; /* top right bottom left - moved top padding from 8px to 11px */
  border-radius: 4px;
  font-weight: 400;
  font-size: 18px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 10000; /* Changed from 1000 to 10000 - higher than logo's 9999 */
  display: block !important;
  line-height: 1.2 !important;
  vertical-align: top !important;
}

.responsive-phone-num a {
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.responsive-phone-num svg {
  margin-right: 4px;
}

/* Optional hover effect for better user experience */
.responsive-phone-num:hover {
  color: black;
  background-color: var(--primary-color);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.responsive-phone-num:hover a {
  color: black;
}

/* -----------------------------------
            Media Queries
            ----------------------------------- */
/* Position for mobile and smaller screens (below 500px) */
@media screen and (max-width: 500px) {
  .responsive-phone-num {
    left: 10px;
  }
}

/* Position for mobile and smaller screens (below 936px) */
@media screen and (max-width: 935px) {
  .responsive-phone-num {
    top: 10px;
  }
}

/* Position for larger screens (936px and above) with navbar */
@media screen and (min-width: 936px) {
  .responsive-phone-num {
    top: 110px;
  }
}
