
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 210 50% 98%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 214 100% 50%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 214 100% 50%;

    --radius: 0.5rem;
  }
  
  /* Adding smooth scrolling to the HTML element */
  html {
    scroll-behavior: smooth;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground font-sans;
  }

  h1, h2, h3, h4, h5, h6 {
    @apply font-semibold tracking-tight;
  }

  h1 {
    @apply text-3xl lg:text-4xl mb-6;
  }

  h2 {
    @apply text-2xl lg:text-3xl mb-4;
  }

  h3 {
    @apply text-xl lg:text-2xl mb-3;
  }
}

@layer components {
  .container-custom {
    @apply container mx-auto px-4 md:px-6 max-w-7xl;
  }
}

/* Custom Tooltip Styles */
.custom-tooltip-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-tooltip-btn {
  padding: 12px 25px;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  background-color: #007bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 8px 15px rgba(0, 123, 255, 0.4);
}

.custom-tooltip-btn:hover {
  background-color: #0056b3;
}

.custom-tooltip-content {
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  width: 240px;
  background: linear-gradient(135deg, #007bff 0%, #00c6ff 100%);
  color: #fff;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  border-radius: 15px;
  transition: all 0.4s ease;
  z-index: 1;
  box-shadow: 0px 10px 20px rgba(0, 123, 255, 0.3);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
}

.custom-tooltip-container:hover .custom-tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

.custom-tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #007bff;
}

.custom-tooltip-text {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* Animated Mail Icon Styles */
.offerte-brievenbus {
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.3s ease;
}

.offerte-brievenbus:hover .animated-mail {
  transform: translateY(50px);
}

.offerte-brievenbus:hover .animated-mail .top-fold {
  transform: rotateX(180deg);
  z-index: 0;
}

.offerte-brievenbus:hover .animated-mail .letter {
  height: 180px;
}

.offerte-brievenbus:hover .shadow {
  width: 250px;
}

.animated-mail {
  position: absolute;
  height: 150px;
  width: 200px;
  transition: 0.4s;
}

.animated-mail .back-fold {
  position: absolute;
  bottom: 0;
  width: 200px;
  height: 100px;
  background: #cf4a43;
  z-index: 0;
}

.animated-mail .letter {
  left: 20px;
  bottom: 0px;
  position: absolute;
  width: 160px;
  height: 60px;
  background: white;
  z-index: 1;
  overflow: hidden;
  transition: 0.4s 0.2s;
}

.animated-mail .letter .letter-border {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #cb5a5e,
    #cb5a5e 8px,
    transparent 8px,
    transparent 18px
  );
}

.animated-mail .letter .letter-title {
  margin-top: 10px;
  margin-left: 5px;
  height: 10px;
  width: 40%;
  background: #cb5a5e;
}

.animated-mail .letter .letter-context {
  margin-top: 10px;
  margin-left: 5px;
  height: 10px;
  width: 20%;
  background: #cb5a5e;
}

.animated-mail .letter .letter-stamp {
  margin-top: 30px;
  margin-left: 120px;
  border-radius: 100%;
  height: 30px;
  width: 30px;
  background: #cb5a5e;
  opacity: 0.3;
}

.animated-mail .top-fold {
  position: absolute;
  top: 50px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 50px 100px 0 100px;
  transform-origin: 50% 0%;
  transition: transform 0.4s 0.4s, z-index 0.2s 0.4s;
  border-color: #cf4a43 transparent transparent transparent;
  z-index: 2;
}

.animated-mail .body {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 100px 200px;
  border-color: transparent transparent #e95f55 transparent;
  z-index: 2;
}

.animated-mail .left-fold {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 50px 0 50px 100px;
  border-color: transparent transparent transparent #e15349;
  z-index: 2;
}

.shadow {
  position: absolute;
  top: 200px;
  left: 50%;
  width: 400px;
  height: 30px;
  transition: 0.4s;
  transform: translateX(-50%);
  border-radius: 100%;
  background: radial-gradient(
    rgba(0, 0, 0, 0.5),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0)
  );
}
