/* PWA-only Mobile Optimierung - NUR FÜR DASHBOARD CONTENT */

/* Debug: Teste ob CSS lädt */
body {
	--pwa-css-loaded: true;
}

/* PWA MOBILE LAYOUT - DASHBOARD UND SUPPLIER INBOX */
@media all and (display-mode: standalone) {
	/* NAVBAR EXPLIZIT AUSSCHLIESSEN - nur main content betreffen */
	main *, .container > *:not(nav):not(header) {
		box-sizing: border-box;
	}
	
	/* Body overflow nur für Hauptinhalt */
	.container {
		max-width: 100vw !important;
		padding-left: 0.5rem !important;
		padding-right: 0.5rem !important;
		overflow-x: hidden !important;
	}
	
	/* NUR Dashboard/Inbox Tab-Container optimieren */
	.bg-white.rounded-lg.shadow-md.mb-8 {
		max-width: 100% !important;
		overflow-x: hidden !important;
		word-wrap: break-word !important;
	}
	
	/* ALLE Transport-Karten responsive machen - STÄRKERE REGELN */
	.tab-content .border.border-gray-200.rounded-lg.p-4,
	.border.border-gray-200.rounded-lg.p-4,
	div[class*="border"][class*="gray-200"][class*="rounded-lg"] {
		max-width: 100% !important;
		width: 100% !important;
		overflow-x: hidden !important;
		overflow-wrap: break-word !important;
		word-wrap: break-word !important;
		padding: 0.75rem !important;
		margin: 0 !important;
		box-sizing: border-box !important;
	}
	
	/* Alle Text-Container in Karten begrenzen */
	.border.border-gray-200.rounded-lg h3,
	.border.border-gray-200.rounded-lg p,
	.border.border-gray-200.rounded-lg div {
		max-width: 100% !important;
		overflow-wrap: break-word !important;
		word-wrap: break-word !important;
	}
	
	/* NUR in Transport-Karten: Button-Container reparieren (Dashboard + Inbox) */
	.tab-content .border.border-gray-200.rounded-lg .flex.items-center.justify-between,
	.border.border-gray-200.rounded-lg .flex.items-center.justify-between {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 0.5rem !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/* NUR in Transport-Karten: Button-Gruppen stapeln (Dashboard + Inbox) */
	.tab-content .border.border-gray-200.rounded-lg .flex.items-center:has(button),
	.border.border-gray-200.rounded-lg .flex.items-center:has(button) {
		flex-direction: column !important;
		width: 100% !important;
		gap: 0.5rem !important;
		max-width: 100% !important;
	}
	
	/* Button-Container mit Aktionsbuttons horizontal anordnen aber responsiv */
	.border.border-gray-200.rounded-lg .flex.space-x-2:has(button),
	.tab-content .border.border-gray-200.rounded-lg .flex.space-x-2:has(button) {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		justify-content: space-between !important;
		gap: 0.5rem !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/* SPEZIELLE REGELN FÜR SUPPLIER INBOX CONTENT - AGGRESSIVE LÖSUNG */
	body:has([class*="supplier"]) .border.border-gray-200.rounded-lg,
	[id*="pending"] .border.border-gray-200.rounded-lg,
	[id*="accepted"] .border.border-gray-200.rounded-lg,
	[id*="completed"] .border.border-gray-200.rounded-lg {
		max-width: calc(100vw - 3rem) !important;
		width: calc(100vw - 3rem) !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		transform: translateX(-0.5rem) !important;
		overflow: hidden !important;
	}
	
	/* NOTFALL-LÖSUNG: Alle Karten in PWA auf Bildschirmbreite zwingen */
	@supports (display-mode: standalone) {
		.border.border-gray-200.rounded-lg {
			max-width: calc(100vw - 2rem) !important;
			width: auto !important;
			margin: 0 !important;
			padding: 0.5rem !important;
			overflow: hidden !important;
			box-sizing: border-box !important;
		}
		
		/* Alle Container-Elemente in Karten begrenzen */
		.border.border-gray-200.rounded-lg * {
			max-width: 100% !important;
			overflow: hidden !important;
			text-overflow: ellipsis !important;
		}
		
		/* Flex-Container in Karten reparieren */
		.border.border-gray-200.rounded-lg .flex {
			flex-wrap: wrap !important;
			max-width: 100% !important;
		}
	}
	
	/* Tab Navigation optimieren */
	nav[aria-label="Tabs"] {
		display: flex !important;
		overflow-x: auto !important;
		width: 100% !important;
		padding: 0.5rem !important;
		gap: 0.5rem !important;
		-webkit-overflow-scrolling: touch !important;
		background-color: rgba(0,255,0,0.1) !important; /* Debug */
	}
	
	nav[aria-label="Tabs"] > .tab-button {
		flex: 0 0 auto !important;
		min-width: 120px !important;
		white-space: nowrap !important;
		font-size: 0.8em !important;
		padding: 0.5rem 0.75rem !important;
	}
	
	/* Scrollbar styling */
	nav[aria-label="Tabs"]::-webkit-scrollbar {
		height: 4px;
	}
	nav[aria-label="Tabs"]::-webkit-scrollbar-thumb {
		background: #ccc;
		border-radius: 2px;
	}
	
	/* PWA CHAT INTERFACE OPTIMIERUNG */
	/* Chat Container für PWA anpassen */
	.lkws-chat-container {
		height: calc(100vh - 120px) !important;
		min-height: calc(100vh - 120px) !important;
		max-height: calc(100vh - 120px) !important;
		margin-top: 0.5rem !important;
		margin-bottom: 0.5rem !important;
		border-radius: 8px !important;
		overflow: hidden !important;
	}
	
	/* PWA GRADIENT CARDS OPTIMIERUNG */
	.cards {
		flex-direction: column !important;
		align-items: center !important;
		padding: 0 0.5rem !important;
		gap: 15px !important;
	}
	
	.card {
		width: calc(100vw - 2rem) !important;
		max-width: calc(100vw - 2rem) !important;
		margin: 0 !important;
		min-height: 70px !important;
		padding: 10px !important;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}
	
	.card__icon {
		width: 32px !important;
		height: 32px !important;
		margin-right: 10px !important;
		background: rgba(255, 255, 255, 0.35) !important;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
	}
	
	.card__icon svg {
		width: 18px !important;
		height: 18px !important;
	}
	
    .card__content {
      background: rgba(240, 240, 240, 0.95) !important;
      padding: 6px 8px !important;
      border-radius: 6px !important;
    }	.card__label {
		font-size: 10px !important;
		margin-bottom: 2px !important;
	}
	
	.card__value {
		font-size: 16px !important;
		margin-bottom: 1px !important;
	}
	
	.card__subtitle {
		font-size: 8px !important;
	}
	
	/* Chat Sidebar PWA Optimierung */
	.lkws-chat-sidebar {
		width: 100% !important;
		max-height: 100px !important;
		min-height: 100px !important;
		border-right: none !important;
		border-bottom: 1.5px solid #262D31 !important;
		display: flex !important;
		flex-direction: row !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		-webkit-overflow-scrolling: touch !important;
	}
	
	/* Chat Links in PWA horizontal anordnen */
	.lkws-chat-sidebar .chat-link {
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		min-width: 90px !important;
		max-width: 120px !important;
		border-bottom: none !important;
		border-left: none !important;
		border-top: 4px solid transparent !important;
		border-right: none !important;
		margin-bottom: 0 !important;
		padding: 8px !important;
		text-align: center !important;
	}
	
	/* Active Chat Link in PWA */
	.lkws-chat-sidebar .chat-link.active,
	.lkws-chat-sidebar .chat-link:focus {
		border-top: 4px solid #25D366 !important;
		border-left: none !important;
		background: #182229 !important;
	}
	
	/* Chat Avatar in PWA */
	.lkws-chat-sidebar .avatar img {
		margin-right: 0 !important;
		margin-bottom: 4px !important;
		height: 32px !important;
		width: 32px !important;
	}
	
	/* Chat Info in PWA */
	.lkws-chat-sidebar .chat-info {
		text-align: center !important;
		min-width: 0 !important;
	}
	
	.lkws-chat-sidebar .chat-title {
		font-size: 0.75rem !important;
		line-height: 1.1 !important;
	}
	
	/* Route in PWA Chat Sidebar ausblenden - da bereits im Chat Header sichtbar */
	.lkws-chat-sidebar .chat-meta {
		display: none !important;
	}
	
	/* Chat Main Area PWA */
	.lkws-chat-main {
		max-height: calc(100vh - 220px) !important;
		height: calc(100vh - 220px) !important;
		display: flex !important;
		flex-direction: column !important;
	}
	
	/* Chat Messages PWA */
	.lkws-chat-messages {
		flex: 1 !important;
		overflow-y: auto !important;
		padding: 1rem 0.75rem !important;
		-webkit-overflow-scrolling: touch !important;
	}
	
	/* Chat Messages Einzelnachricht PWA */
	.lkws-chat-message {
		max-width: 85% !important;
		font-size: 0.9rem !important;
		padding: 0.6rem 1rem !important;
	}
	
	/* Chat Input Area PWA */
	.lkws-chat-input-area {
		padding: 0.75rem !important;
		flex-shrink: 0 !important;
	}
	
	.lkws-chat-input-area input[type="text"] {
		padding: 0.6rem 0.8rem !important;
		font-size: 0.9rem !important;
	}
	
	.lkws-chat-input-area button {
		padding: 0.6rem 1.2rem !important;
		font-size: 0.9rem !important;
	}
	
	/* Chat Filler PWA */
	.lkws-chat-filler {
		min-height: calc(100vh - 220px) !important;
		height: calc(100vh - 220px) !important;
		padding: 1rem !important;
	}
	
	.lkws-chat-filler .icon {
		font-size: 2rem !important;
	}
	
	/* PWA SUPPLIER INBOX OPTIMIERUNG */
	/* Hauptcontainer des Postfachs */
	.container {
		padding-left: 0.5rem !important;
		padding-right: 0.5rem !important;
	}
	
	/* Supplier Inbox spezifische Grid-Optimierung */
	.border-2.border-yellow-200.rounded-lg,
	.border-2.border-green-200.rounded-lg {
		padding: 1rem !important;
		margin: 0 0 1rem 0 !important;
		max-width: 100% !important;
		overflow-x: hidden !important;
	}
	
	/* Grid Container in Inbox Cards forcieren */
	.border-2.border-yellow-200 .grid.grid-cols-1.md\\:grid-cols-3,
	.border-2.border-green-200 .grid.grid-cols-1.md\\:grid-cols-3 {
		grid-template-columns: 1fr !important;
		gap: 0.75rem !important;
	}
	
	/* Inbox Detail Cards kompakter machen */
	.border-2.border-yellow-200 .bg-white.rounded-lg.p-4,
	.border-2.border-green-200 .bg-white.rounded-lg.p-4 {
		padding: 0.75rem !important;
		margin-bottom: 0.5rem !important;
	}
	
	/* Preise und Text in Inbox Cards begrenzen */
	.border-2 .text-blue-600,
	.border-2 .text-orange-600,
	.border-2 p {
		word-break: break-word !important;
		overflow-wrap: break-word !important;
		max-width: 100% !important;
	}
	
	/* Action Forms in Inbox kompakter */
	.border-2 .bg-white.rounded-lg.p-4:has(form) {
		padding: 0.75rem !important;
	}
	
	/* Button Container in Inbox Cards */
	.border-2 .flex.space-x-3 {
		flex-direction: column !important;
		gap: 0.5rem !important;
		align-items: stretch !important;
	}
	
	.border-2 .flex.space-x-3 button {
		width: 100% !important;
		justify-content: center !important;
		margin: 0 !important;
	}
	
	/* Textarea in Inbox Forms */
	.border-2 textarea {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}
}

/* BUYER PAGINATION STYLES */
.pindicator {
  background-color: transparent; /* Transparent background instead of white */
  display: flex;
  margin: 2rem auto 0;
  width: 30rem;
  max-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.pindicator .bullet {
  flex: 1;
  position: relative;
  text-align: center;
  transform-style: preserve-3d;
}

.pindicator .bullet::before,
.pindicator .bullet::after {
  content: '';
  display: block;
  position: absolute;
  height: .25rem; /* Thinner line */
  top: 1rem; /* Better centered with icon */
  transform: translate3d(0,0,-1px);
  left: 0;
  right: 0;
}

.pindicator .bullet::before {
  background-color: #D1D5DB; /* Lighter gray */
  width: 100%;
}

.pindicator .bullet::after {
  background-color: #3B82F6; /* Blue color to match theme */
  transition: opacity .25s ease-out;
  opacity: 0;
  width: 100%;
}

.pindicator .bullet:first-child::before,
.pindicator .bullet:first-child::after {
  left: 50%;
  width: 50%;
}

.pindicator .bullet:last-child::before,
.pindicator .bullet:last-child::after {
  left: 0;
  width: 50%;
}

.pindicator .icon {
  background-color: #D1D5DB; /* Lighter gray */
  border: 3px solid transparent; /* Add border for better definition */
  border-radius: 100%;
  color: transparent;
  cursor: pointer;
  font-size: 1rem;
  display: inline-block;
  height: 2em;
  line-height: 1.7; /* Better vertical centering */
  text-align: center;
  transition: all .25s ease-out;
  width: 2em;
  z-index: 2; /* Higher z-index to stay above lines */
  position: relative;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8); /* White outline for better visibility */
}

.pindicator .text {
  color: #9CA3AF; /* Lighter gray */
  font-size: .65rem;
  margin-top: 0.5rem;
  text-transform: uppercase;
  transition: color .25s ease-out;
  font-weight: 500;
}

.pindicator .past .icon,
.pindicator .current .icon {
  background-color: #3B82F6; /* Blue color to match theme */
  border-color: #3B82F6;
  color: white;
}

.pindicator .past::after,  
.pindicator .current::after {
  opacity: 1;
}

.pindicator .past .text,
.pindicator .current .text,
.pindicator .next .text {
  color: #374151; /* Gray-700 to match theme */
}

/* Mobile responsiveness for pagination */
@media (max-width: 640px) {
  .pindicator {
    width: 100%;
    margin: 1rem auto 0;
  }
  
  .pindicator .text {
    font-size: 0.55rem;
    margin-top: 0.25rem;
  }
  
  .pindicator .icon {
    font-size: 0.875rem;
    height: 1.75em;
    width: 1.75em;
  }
}

/* CO2-REPORT ANIMATED BUTTON STYLES */
.co2-report-button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.co2-icon-container {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 8px 8px 15px 0 rgba(171, 171, 171, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #10B981;
}

.co2-icon-container svg {
  width: 35px;
  height: auto;
}

.co2-icon-container svg:last-child {
  position: absolute;
}

.co2-icon-container:active {
  animation: co2-press 0.2s 1 linear;
}

.co2-icon-container:active svg:last-child {
  animation: co2-bounce 0.2s 1 linear;
}

.co2-report-text {
  color: #10B981;
  font-family: sans-serif;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  text-align: center;
}

@keyframes co2-press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.92);
  }
  to {
    transform: scale(1);
  }
}

@keyframes co2-bounce {
  50% {
    transform: rotate(5deg) translate(15px, -30px);
  }
  to {
    transform: scale(0.9) rotate(10deg) translate(35px, -50px);
    opacity: 0;
  }
}

/* Responsive adjustments for mobile */
@media (max-width: 640px) {
  .co2-icon-container {
    width: 60px;
    height: 60px;
  }
  
  .co2-icon-container svg {
    width: 25px;
  }
  
  .co2-report-text {
    font-size: 10px;
  }
}

/* GLASSMORPHISM BUTTON STYLES FOR ORDERS & CO2 */
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

/* Orders Button Container */
.orders-button-wrap {
  position: relative;
  display: inline-block;
}

/* Button Shadow Container */
.orders-button-shadow {
  --shadow-cuttoff-fix: 2em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(2px, 0.125em, 12px));
  -webkit-filter: blur(clamp(2px, 0.125em, 12px));
  overflow: visible;
  pointer-events: none;
}

/* Shadow */
.orders-button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  height: calc(100% - var(--shadow-cuttoff-fix) - 0.25em);
  top: calc(var(--shadow-cuttoff-fix) - 0.5em);
  left: calc(var(--shadow-cuttoff-fix) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
  overflow: visible;
  opacity: 1;
}

/* ========== ORDERS GLASS BUTTON ========== */

/* CSS Properties for angles */
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

/* Button Wrap Container */
.button-wrap {
  position: relative;
  z-index: 2;
  border-radius: 999vw;
  background: transparent;
  pointer-events: none;
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
  display: inline-block;
}

/* Button Shadow Container */
.button-shadow {
  --shadow-cuttoff-fix: 0.5em;
  position: absolute;
  width: calc(100% + var(--shadow-cuttoff-fix));
  height: calc(100% + var(--shadow-cuttoff-fix));
  top: calc(0% - var(--shadow-cuttoff-fix) / 2);
  left: calc(0% - var(--shadow-cuttoff-fix) / 2);
  filter: blur(clamp(2px, 0.125em, 6px));
  -webkit-filter: blur(clamp(2px, 0.125em, 6px));
  overflow: visible;
  pointer-events: none;
}

/* Shadow */
.button-shadow::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: 999vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cuttoff-fix));
  height: calc(100% - var(--shadow-cuttoff-fix));
  top: calc(var(--shadow-cuttoff-fix) / 2);
  left: calc(var(--shadow-cuttoff-fix) / 2);
  padding: 0;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
  overflow: visible;
  opacity: 0.8;
}

/* ========== BUTTON BASE STYLES ========== */

.orders-glass-button {
  /* Basic Styling */
  --border-width: clamp(1px, 0.0625em, 4px);
  all: unset;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  pointer-events: auto;
  z-index: 3;
  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: 999vw;
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0 0 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -webkit-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
  text-decoration: none;
  display: inline-block;
}

.orders-glass-button:hover {
  transform: scale(0.975);
  backdrop-filter: blur(0.01em);
  -webkit-backdrop-filter: blur(0.01em);
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(255, 255, 255, 0.5),
    0 0 0 0 rgba(255, 255, 255, 1);
}

/* Button Text */
.orders-glass-button span {
  position: relative;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  font-family: "Inter", sans-serif;
  letter-spacing: -0.05em;
  font-weight: 500;
  font-size: 1rem;
  color: rgba(50, 50, 50, 1);
  -webkit-font-smoothing: antialiased;
  text-shadow: 0em 0.25em 0.05em rgba(0, 0, 0, 0.1);
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1);
  padding-inline: 2.2em;
  padding-block: 1.6em;
}

.orders-glass-button:hover span {
  text-shadow: 0.025em 0.025em 0.025em rgba(0, 0, 0, 0.12);
}

/* Text Shimmer Effect */
.orders-glass-button span::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  width: calc(100% - var(--border-width));
  height: calc(100% - var(--border-width));
  top: calc(0% + var(--border-width) / 2);
  left: calc(0% + var(--border-width) / 2);
  box-sizing: border-box;
  border-radius: 999vw;
  overflow: clip;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  z-index: 3;
  mix-blend-mode: screen;
  pointer-events: none;
  background-size: 200% 200%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition: background-position calc(400ms * 1.25) cubic-bezier(0.25, 1, 0.5, 1),
    --angle-2 calc(400ms * 1.25) cubic-bezier(0.25, 1, 0.5, 1);
}

.orders-glass-button:hover span::after {
  background-position: 25% 50%;
}

.orders-glass-button:active span::after {
  background-position: 50% 15%;
  --angle-2: -15deg;
}

/* ========== BUTTON OUTLINE ========== */

.orders-glass-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: 999vw;
  width: calc(100% + var(--border-width));
  height: calc(100% + var(--border-width));
  top: calc(0% - var(--border-width) / 2);
  left: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  box-sizing: border-box;
  background: conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.5) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.5)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1),
    --angle-1 500ms ease;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.5);
}

.orders-glass-button:hover::after {
  --angle-1: -125deg;
}

.orders-glass-button:active::after {
  --angle-1: -75deg;
}

/* Shadow Hover Effects */
.button-wrap:has(.orders-glass-button:hover) .button-shadow {
  filter: blur(clamp(2px, 0.0625em, 4px));
  -webkit-filter: blur(clamp(2px, 0.0625em, 4px));
  transition: filter 400ms cubic-bezier(0.25, 1, 0.5, 1);
}

.button-wrap:has(.orders-glass-button:hover) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) / 2 + 0.125em);
  opacity: 0.9;
}

/* Active/Press Effects */
.button-wrap:has(.orders-glass-button:active) {
  transform: rotate3d(1, 0, 0, 25deg);
}

.button-wrap:has(.orders-glass-button:active) .orders-glass-button {
  box-shadow: inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.125em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0.225em 0.05em 0 rgba(0, 0, 0, 0.05),
    0 0.25em 0 0 rgba(255, 255, 255, 0.75),
    inset 0 0.25em 0.05em 0 rgba(0, 0, 0, 0.15);
}

.button-wrap:has(.orders-glass-button:active) .button-shadow {
  filter: blur(clamp(2px, 0.125em, 6px));
  -webkit-filter: blur(clamp(2px, 0.125em, 6px));
}

.button-wrap:has(.orders-glass-button:active) .button-shadow::after {
  top: calc(var(--shadow-cuttoff-fix) / 2);
  opacity: 0.6;
}

.button-wrap:has(.orders-glass-button:active) span {
  text-shadow: 0.025em 0.25em 0.05em rgba(0, 0, 0, 0.12);
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .orders-glass-button span::after,
  .orders-glass-button:active span::after {
    --angle-2: -45deg;
  }

  .orders-glass-button::after,
  .orders-glass-button:hover::after,
  .orders-glass-button:active::after {
    --angle-1: -75deg;
  }
}

/* Responsive adjustments for orders-glass-button */
@media (max-width: 640px) {
  .orders-glass-button span {
    font-size: 0.875rem;
    padding-inline: 1.8em;
    padding-block: 1.2em;
  }
}

@media (max-width: 480px) {
  .orders-glass-button span {
    font-size: 0.8rem;
    padding-inline: 1.5em;
    padding-block: 1em;
  }
}

/* GRADIENT BANNER CARDS DESIGN */
.main-container {
  padding: 30px;
}

/* CARDS */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
}

.card {
  margin: 0;
  padding: 15px;
  width: calc(33.333% - 10px);
  min-height: 120px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.2s;
  flex: 1;
  max-width: calc(33.333% - 10px);
}

.card:hover {
  box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.4);
  transform: scale(1.01);
}

.card__link,
.card__icon {
  position: relative;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
}

.card__icon {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  margin-right: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: rgba(240, 240, 240, 0.85);
  padding: 10px 12px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.card__label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 4px;
  text-shadow: none;
}

.card__value {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
  margin-bottom: 2px;
  text-shadow: none;
}

.card__subtitle {
  font-size: 10px;
  font-weight: 500;
  text-shadow: none;
}

/* CARD BACKGROUNDS */
.card-1 {
  background: radial-gradient(#b3f1f7, #a8d4ff);
}

.card-1 .card__subtitle {
  color: #0891b2;
}

.card-2 {
  background: radial-gradient(#f9dfe4, #f4c2d7);
}

.card-2 .card__subtitle {
  color: #be185d;
}

.card-3 {
  background: radial-gradient(#c3d9ff, #d1c4e9);
}

.card-3 .card__subtitle {
  color: #3730a3;
}

.card-4 {
  background: radial-gradient(#c7f2e8, #b8e6d6);
}

.card-4 .card__subtitle {
  color: #059669;
}

.card-5 {
  background: radial-gradient(#f7d1ea, #e9c7f0);
}

.card-5 .card__subtitle {
  color: #a21caf;
}

/* RESPONSIVE GRADIENT CARDS */
@media (max-width: 1600px) {
  .cards {
    justify-content: center;
  }
}

/* Mobile responsive for gradient cards */
@media (max-width: 768px) {
  .cards {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .card {
    width: 100%;
    max-width: 100%;
    margin: 5px 0;
    min-height: 80px;
    padding: 12px;
  }
  
  .card__icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  }
  
  .card__icon svg {
    width: 20px;
    height: 20px;
  }
  
  .card__content {
    background: rgba(240, 240, 240, 0.9);
    padding: 8px 10px;
  }
  
  .card__label {
    font-size: 11px;
  }
  
  .card__value {
    font-size: 18px;
  }
  
  .card__subtitle {
    font-size: 9px;
  }
}

/* NAVBAR LOGO POSITIONING FIX */
nav img[alt="ESGO Logo"] {
  position: static !important;
  display: inline-block !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  float: none !important;
}

/* Ensure logo container stays in place */
.flex-shrink-0.flex.items-center.space-x-2 {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

/* ANIMATED MAIL LETTER DESIGN FOR CHAT BUTTON */
.chat-letter-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  color: white;
  font-weight: 500;
}

.chat-letter-container:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fef3c7;
}

.chat-letter-container .letter-image {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.chat-letter-container .animated-mail {
  position: absolute;
  height: 24px;
  width: 32px;
  transition: .4s;
  top: 4px;
  left: 0;
}

.chat-letter-container .animated-mail .body {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 16px 32px;
  border-color: transparent transparent #e95f55 transparent;
  z-index: 2;
}

.chat-letter-container .animated-mail .top-fold {
  position: absolute;
  top: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 16px 0 16px;
  transform-origin: 50% 0%;
  transition: transform .4s .4s, z-index .2s .4s;
  border-color: #cf4a43 transparent transparent transparent;
  z-index: 2;
}

.chat-letter-container .animated-mail .back-fold {
  position: absolute;
  bottom: 0;
  width: 32px;
  height: 16px;
  background: #cf4a43;
  z-index: 0;
}

.chat-letter-container .animated-mail .left-fold {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 16px;
  border-color: transparent transparent transparent #e15349;
  z-index: 2;
}

.chat-letter-container .animated-mail .letter {
  left: 3px;
  bottom: 0px;
  position: absolute;
  width: 26px;
  height: 10px;
  background: white;
  z-index: 1;
  overflow: hidden;
  transition: .4s .2s;
}

.chat-letter-container .animated-mail .letter .letter-border {
  height: 2px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #cb5a5e,
    #cb5a5e 2px,
    transparent 2px,
    transparent 4px
  );
}

.chat-letter-container .animated-mail .letter .letter-title {
  margin-top: 2px;
  margin-left: 1px;
  height: 2px;
  width: 40%;
  background: #cb5a5e;
}

.chat-letter-container .animated-mail .letter .letter-context {
  margin-top: 2px;
  margin-left: 1px;
  height: 2px;
  width: 20%;
  background: #cb5a5e;
}

.chat-letter-container .animated-mail .letter .letter-stamp {
  margin-top: 4px;
  margin-left: 19px;
  border-radius: 100%;
  height: 5px;
  width: 5px;
  background: #cb5a5e;
  opacity: 0.3;
}

.chat-letter-container:hover .animated-mail {
  transform: translateY(8px);
}

.chat-letter-container:hover .animated-mail .top-fold {
  transition: transform .4s, z-index .2s;
  transform: rotateX(180deg);
  z-index: 0;
}

.chat-letter-container:hover .animated-mail .letter {
  height: 28px;
}

.chat-letter-container .chat-text {
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

/* STAR RATING SYSTEM */
.star-wrapper {
  position: relative;
  direction: rtl;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 0;
  margin-left: -20px;
}

.star-wrapper a {
  font-size: 3em;
  color: #e5e7eb;
  text-decoration: none;
  transition: all 0.5s;
  margin: 4px;
  cursor: pointer;
}

.star-wrapper a:hover {
  color: gold;
  transform: scale(1.3);
}

.s1:hover ~ a {
  color: gold;
}

.s2:hover ~ a {
  color: gold;
}

.s3:hover ~ a {
  color: gold;
}

.s4:hover ~ a {
  color: gold;
}

.s5:hover ~ a {
  color: gold;
}

/* Selected state - ausgewählte Sterne */
.star-wrapper a.selected {
  color: gold;
}

/* Unselected state - nicht ausgewählte Sterne */
.star-wrapper a.unselected {
  color: #e5e7eb;
}
