/* TLV Calculator CSS */

/* Container styling */
.tlv-calculator-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  background-color: #f9fafb;
  min-height: 500px;
  height: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Reset */
.tlv-calculator-container * {
  box-sizing: border-box;
}

/* Utility classes (Tailwind-like) */
.tlv-app {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  height: 100%;
  background-color: #f9fafb;
  color: #111827;
}

/* Button styling in the app bar */
.tlv-app-bar button {
  display: flex;
  align-items: center;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
  background-color: #FF7F2A; /* Orange background */
  color: white; /* White text */
}

.tlv-app-bar button:hover {
  background-color: #E06E1E; /* Slightly darker orange when hovering */
  transform: translateY(-1px);
  color: white; /* Ensure text stays white on hover */
}

.tlv-app-bar button:active {
  transform: translateY(0);
  background-color: #D05E0E; /* Even darker when active */
}

/* Make sure the buttons are clearly clickable */
.tlv-app-bar button svg {
  pointer-events: none; /* Ensures clicks go to the button, not the SVG */
}

/* Improved hover effect with subtle glow for orange buttons */
.tlv-app-bar button:hover {
  box-shadow: 0 0 8px rgba(255, 127, 42, 0.5); /* Subtle orange glow */
}

.tlv-app-bar button span {
  color: white; /* Ensure text is white */
}

/* Add a small shadow for better contrast against blue background */
.tlv-app-bar button {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive text for buttons */
@media (max-width: 768px) {
  .tlv-app-bar .md\:inline {
    display: none;
  }
  
  .tlv-app-bar button {
    padding: 0.5rem;
  }
}

/* Add clear hover states for all buttons */
button {
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

button:focus:not(:active)::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.tlv-app-bar {
  background-color: #2563eb;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tlv-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 70px; /* Make room for the nav */
}

.tlv-dashboard {
  background-color: white;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tlv-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.5rem;
}

.tlv-stats > div {
  width: 33.333333%;
  padding: 0 0.5rem;
}

.tlv-stats > div > div {
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.tlv-activities {
  padding: 1rem;
}

.tlv-activity {
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-left-width: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tlv-activity:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tlv-add-btn {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
}

/* Improved navigation styling */
.tlv-nav {
  padding: 0.75rem 0;
  background-color: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.tlv-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  min-width: 80px;
}

.tlv-nav button:hover {
  background-color: #eff6ff;
}

.tlv-nav button.active {
  background-color: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.tlv-nav button svg {
  margin-bottom: 0.25rem;
}

.tlv-nav button span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Make the add button more prominent */
.tlv-add-btn button {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tlv-add-btn button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

.tlv-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

.tlv-analytics,
.tlv-settings {
  padding: 1rem;
}

/* Background colors */
.bg-blue-100 { background-color: #dbeafe; }
.bg-green-100 { background-color: #d1fae5; }
.bg-orange-100 { background-color: #ffedd5; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-500 { background-color: #10b981; }
.bg-orange-500 { background-color: #f97316; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-white { background-color: white; }
.bg-black { background-color: black; }
.bg-blue-50 { background-color: #eff6ff; }

/* Text colors */
.text-white { color: white; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.text-red-500 { color: #ef4444; }
.text-orange-500 { color: #f97316; }
.text-blue-600 { color: #2563eb; }
.text-blue-500 { color: #3b82f6; }

/* Border colors */
.border-gray-200 { border-color: #e5e7eb; }
.border-green-500 { border-color: #10b981; }
.border-orange-500 { border-color: #f97316; }
.border-blue-200 { border-color: #bfdbfe; }

/* Font sizes */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-md { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

/* Font weights */
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }

/* Spacing */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.pt-1 { padding-top: 0.25rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-4 { padding-bottom: 1rem; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-3 { margin-left: 0.75rem; margin-right: 0.75rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-7 { margin-left: 1.75rem; }

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* Grid */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Width & Height */
.w-full { width: 100%; }
.w-1\/3 { width: 33.333333%; }
.h-2\.5 { height: 0.625rem; }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-full { height: 100%; }
.max-w-md { max-width: 28rem; }

/* Other utilities */
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-l-4 { border-left-width: 4px; }
.cursor-pointer { cursor: pointer; }
.divide-y > * + * { border-top-width: 1px; border-color: #e5e7eb; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.overflow-y-auto { overflow-y: auto; }
.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-1 { top: 0.25rem; }
.left-1 { left: 0.25rem; }
.bottom-20 { bottom: 5rem; }
.right-4 { right: 1rem; }
.z-50 { z-index: 50; }
.appearance-none { appearance: none; }
.bg-opacity-50 { background-color: rgba(0, 0, 0, 0.5); }
.text-center { text-align: center; }

/* Form elements */
input, select {
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus, select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
}

button {
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

/* Lucide icons styling */
.lucide-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .tlv-calculator-container {
    height: 100vh;
    max-width: 100%;
    border-radius: 0;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .w-1\/3 {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .tlv-stats {
    flex-direction: column;
  }
  
  .tlv-stats > div {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .tlv-nav button {
    padding: 0.5rem;
    min-width: 70px;
  }
}