@import url('variables.css');

.sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  padding: 12px 4px 12px 12px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.headerTitle {
  margin-top: 12px;
  margin-bottom: 12px;
  width: 100%; /* Make it full width of its container */
  height: auto; /* Maintain aspect ratio */
  color: var(--text-primary);
}

.headerTitle svg {
  display: block; /* Remove any extra space below the SVG */
  width: 100%; /* Make SVG fill the width of its container */
  height: auto; /* Maintain aspect ratio */
  stroke: currentColor;
  fill: currentColor;
}

.nav-links {
  list-style-type: none;
  padding: 0;
}

.nav-links li {
  margin-bottom: 10px;
}

.nav-links a {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a .icon {
  margin-right: 10px;
  width: 20px;
  height: 20px;
}

.nav-links a .icon use {
  fill: currentColor;
}

.nav-links a:hover {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.nav-links a.active {
  background-color: var(--bg-primary);
  box-shadow: 0 0 1px var(--shadow-color);
  color: var(--text-primary);
}

.email-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #FFFFFF; /* Set the text color to white */
  border: 1px solid #7F7DFF;
  box-shadow: 0 0 1px var(--shadow-color), inset 0 2px 12px 2px rgba(255, 255, 255, 0.3);
  background-color: #5856D6;
  height: 40px;
  text-decoration: none;
  border-radius: 8px;
  margin-top: auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.email-button .icon {
  margin-right: 5px;
  width: 20px;
  height: 20px;
}

.email-button:hover {
  background-color: #4745AC; /* Darker shade for hover effect */
}

.protected-section {
  position: relative;
  list-style-type: none;
  padding-left: 0;
}

.protected-title {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
  padding-left: 8px;
}

.blur-container {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.blurred-items {
  filter: blur(6px);
  pointer-events: none; /* Prevent interaction until unlocked */
  opacity: 0.7;
  margin: 0;
  padding: 0;
}

.blurred-items li {
  margin-bottom: 10px;
}
.pin-input-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.pin-input {
  width: 16px;
  height: 32px;
  margin: 0 2px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--shadow-color);
  z-index: 1;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  text-align: center;
}
.pin-input:focus {
  outline: none;
  border: 1px solid #4745ac83;
}

.unblurred {
  filter: none;
  margin: 0;
  pointer-events: auto; /* Allow interaction when unlocked */
  opacity: 1;
}

/* Add these new styles to your existing CSS */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.pin-input.error {
  animation: shake 0.5s ease-in-out;
  border-color: #ff3b30;
}

/* Add these new styles to your existing CSS */
@keyframes success-bounce {
  0%, 70% { transform: translateY(0); }
  35% { transform: translateY(-5px); }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes fade-out-blur {
  from { filter: blur(6px); opacity: 0.7; }
  to { filter: blur(0); opacity: 1; }
}

.pin-input.success {
  animation: success-bounce 0.7s ease-in-out forwards;
  border-color: #34c759;
}

.blurred-items.unblurring {
  animation: fade-out-blur 0.5s ease-in-out forwards;
}

/* Update media query for mobile view */
@media (max-width: 768px) {
  .sidebar {
    width: 90vw;
    height: 40px; /* Adjust this value as needed */
    position: fixed;
    scrollbar-width: none;
    bottom: 0;
    left: 0;
    padding: 6px;
    margin-bottom: 8px;
    margin-left: 5vw;
    margin-right: 5vw;
    border-radius: 24px;
    flex-direction: row;
    align-items: center;
    z-index: 1000;
    overflow-x: auto;
    white-space: nowrap;
    box-shadow: 0 0 1px var(--shadow-color);
  }

  .headerTitle {
    display: none; /* Hide the header title on mobile */
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    margin: 0;
  }

  .nav-links li {
    margin-bottom: 0;
    margin-right: 10px;
  }

  .nav-links a {
    flex-direction: row;
    font-size: 12px;    
    text-align: center;
    border-radius: 16px;
  }

  .nav-links a .icon {
    margin-right: 6px;
  }

  .email-button {
    border-radius: 18px;
    padding-left: 12px;
    padding-right: 12px;
    height: 38px;
  }

  .protected-section {
    display: none;
  }
}