/* FastOrder - Main Application Styles */

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.5;
  color: #111827;
  background: #f9fafb;
}

/* Link Styles - Better readability, no purple visited links */
a {
  color: #0d6efd !important;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}

a:visited {
  color: #0d6efd !important;
}

a:hover {
  color: #0a58ca !important;
  text-decoration: underline;
}

a:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Appbar */
.appbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.appbar-row {
  display: grid;
  grid-template-columns: 300px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}

/* Brand */
.brand {
  display: grid;
  grid-template-columns: 40px auto;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f3f4f6;
  background-image: url('/images/logo.svg');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.brand-text {
  font-weight: 800;
  font-size: 1.125rem;
}

/* Searchbar */
.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.searchbar input,
.searchbar select {
  padding: 10px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
}

.searchbar input:focus,
.searchbar select:focus {
  outline: none;
  border-color: #0b57d0;
  background: #fff;
}

/* Icon Button */
.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

/* Appbar Icons */
.appbar-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  background-image: url('/images/avatar.svg');
  background-size: contain;
}

/* Primary Tabs */
.primary-tabs {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 8px 0;
}

.tab {
  position: relative;
  padding: 10px 0;
  text-decoration: none;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s;
}

.tab:hover {
  color: #0b57d0;
}

.tab.is-active {
  color: #0b57d0;
}

.tab.is-active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  background: #0b57d0;
  border-radius: 3px;
}

/* Hero Banner */
.hero-banner {
  background: #fff176;
  border-bottom: 1px solid #e5e7eb;
}

.banner {
  height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dots Indicator */
.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 0 16px;
}

.dot {
  width: 44px;
  height: 6px;
  border-radius: 999px;
  background: #d1d5db;
  cursor: pointer;
  transition: background 0.2s;
}

.dot.active,
.dot:hover {
  background: #0b57d0;
}

/* Main Content */
.main {
  padding: 16px 0 48px;
}

.section-title {
  font: 700 1.25rem/1.35 system-ui, 'Segoe UI', Arial;
  margin: 24px 0 16px;
}

/* Tiles/Cards Grid */
.tiles {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 4px 6px rgba(17, 24, 39, 0.1);
  transform: translateY(-2px);
}

.tile-thumb {
  height: 180px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 8px 8px 0 0;
  font-size: 48px;
}

.tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-title {
  text-align: center;
  font-weight: 600;
  padding: 10px 8px 14px;
}

/* Preloader */
#preloader {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
  overflow: visible;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

#status {
  width: 200px;
  height: 200px;
  background-image: url('/images/loader.gif');
  background-repeat: no-repeat;
  background-position: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .appbar-row {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }

  .searchbar {
    grid-column: 1 / -1;
  }

  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
