/* ============================================
   Mobile Tyre Landing – Custom styles
   Load after Tailwind CDN
   ============================================ */

/* Page transition: fade out before navigate (LCP-friendly: body visible immediately) */
body {
  opacity: 1;
}
body.page-loaded {
  opacity: 1;
}
body.page-leaving {
  opacity: 0;
  transition-duration: 0.2s;
}

/* Fallback colors before Tailwind loads (LCP) */
body { background-color: #18181b; color: #e4e4e7; }
/* Brand color (also in Tailwind config) */
:root {
  --color-safety: #fede00;
  --color-safety-hover: #e5c900;
  --color-safety-active: #ccb300;
}

/* ============================================
   Light theme (data-theme="light" on <html>)
   ============================================ */
[data-theme="light"] body {
  background-color: #f4f4f5;
  color: #18181b;
}
[data-theme="light"] header {
  background-color: #fff;
  border-color: #e4e4e7;
}
[data-theme="light"] header .nav-desktop a {
  color: #52525b;
}
[data-theme="light"] header .nav-desktop a:hover {
  background-color: #f4f4f5;
  color: #18181b;
}
[data-theme="light"] header .nav-desktop a.bg-zinc-800 {
  background-color: #e4e4e7;
  color: #18181b;
}
[data-theme="light"] .nav-mobile-panel {
  background: #fff;
}
[data-theme="light"] .nav-mobile-link {
  color: #52525b;
}
[data-theme="light"] .nav-mobile-link:hover {
  background: #f4f4f5;
  color: #18181b;
}
[data-theme="light"] .nav-mobile-panel .border-t {
  border-color: #e4e4e7;
}
[data-theme="light"] .nav-mobile-toggle {
  color: #52525b;
}
[data-theme="light"] .nav-mobile-toggle:hover {
  background: #f4f4f5;
  color: #18181b;
}
[data-theme="light"] .nav-mobile-toggle[aria-expanded="true"] {
  background: #e4e4e7;
  color: var(--color-safety);
}
[data-theme="light"] footer {
  background-color: #fff;
  border-color: #e4e4e7;
}
[data-theme="light"] footer p.font-bold.text-white,
[data-theme="light"] footer .text-white {
  color: #18181b !important;
}
[data-theme="light"] footer .text-zinc-400,
[data-theme="light"] footer .text-zinc-500 {
  color: #71717a !important;
}
[data-theme="light"] footer a.text-zinc-400:hover,
[data-theme="light"] footer a.text-zinc-500:hover {
  color: #18181b !important;
}
[data-theme="light"] main .text-white,
[data-theme="light"] h1.text-white,
[data-theme="light"] h2.text-white {
  color: #18181b !important;
}
[data-theme="light"] main .text-zinc-300,
[data-theme="light"] main .text-zinc-400 {
  color: #52525b !important;
}
[data-theme="light"] main .text-zinc-100 {
  color: #18181b !important;
}
[data-theme="light"] .hero-overlay {
  background: linear-gradient(180deg, rgba(244,244,245,0.92) 0%, rgba(228,228,231,0.88) 50%, rgba(244,244,245,0.94) 100%);
}
[data-theme="light"] .hero-section .text-white {
  color: #18181b !important;
}
[data-theme="light"] .hero-section .text-zinc-300,
[data-theme="light"] .hero-section .text-zinc-400 {
  color: #3f3f46 !important;
}
[data-theme="light"] .hero-section .bg-zinc-900\/80 {
  background-color: rgba(255,255,255,0.9);
  border-color: var(--color-safety);
  color: #18181b;
}
[data-theme="light"] .bg-zinc-800,
[data-theme="light"] .service-block.bg-zinc-800,
[data-theme="light"] article.bg-zinc-800 {
  background-color: #fff !important;
  border-color: #e4e4e7 !important;
}
[data-theme="light"] .service-block:hover,
[data-theme="light"] article.service-block:hover {
  background-color: #fafafa !important;
  border-color: var(--color-safety) !important;
}
[data-theme="light"] #vehicle-result,
[data-theme="light"] .bg-zinc-800\/80 {
  background-color: rgba(255,255,255,0.95) !important;
  border-color: #e4e4e7 !important;
}
[data-theme="light"] #vehicle-result .border-zinc-600,
[data-theme="light"] #vehicle-result .border-b {
  border-color: #e4e4e7 !important;
}
[data-theme="light"] #vehicle-result .text-zinc-500 {
  color: #71717a !important;
}
[data-theme="light"] #vehicle-result .text-zinc-200 {
  color: #18181b !important;
}
[data-theme="light"] .vrm-label {
  color: #71717a;
}
[data-theme="light"] main input.bg-zinc-800,
[data-theme="light"] main textarea.bg-zinc-800,
[data-theme="light"] main .bg-zinc-800 {
  background-color: #fff !important;
  border-color: #d4d4d8 !important;
  color: #18181b !important;
}
[data-theme="light"] main input.bg-zinc-700 {
  background-color: #f4f4f5 !important;
  border-color: #d4d4d8 !important;
  color: #18181b !important;
}
[data-theme="light"] main .text-zinc-300 {
  color: #52525b !important;
}
[data-theme="light"] main label .text-zinc-300 {
  color: #52525b !important;
}
[data-theme="light"] .fixed.bottom-0 a.bg-zinc-700 {
  background-color: #e4e4e7;
  color: #18181b;
  border-color: #d4d4d8;
}
[data-theme="light"] .fixed.bottom-0 a.bg-zinc-700:hover {
  background-color: #d4d4d8;
}
[data-theme="light"] .border-zinc-600 {
  border-color: #e4e4e7;
}
[data-theme="light"] .border-t.border-zinc-700 {
  border-color: #e4e4e7 !important;
}
[data-theme="light"] #theme-toggle {
  color: #71717a;
}
[data-theme="light"] #theme-toggle:hover {
  background: #f4f4f5;
  color: #18181b;
}
[data-theme="light"] .service-card {
  background: #fff;
  border-color: #e4e4e7;
  color: #18181b;
}
[data-theme="light"] .service-card:hover {
  background: #fafafa;
  border-color: #fede00;
}
[data-theme="light"] .service-card-title {
  color: #18181b;
}
[data-theme="light"] .service-card-desc {
  color: #71717a;
}
[data-theme="light"] .service-detail {
  border-color: #e4e4e7;
}
[data-theme="light"] .bg-zinc-800\/50 {
  background-color: rgba(244,244,245,0.8) !important;
}
[data-theme="light"] .rounded-xl.border-safety.bg-zinc-900 {
  background-color: #fff !important;
  border-color: var(--color-safety) !important;
}
[data-theme="light"] .rounded-xl.border-safety.bg-zinc-900 th,
[data-theme="light"] .rounded-xl.border-safety.bg-zinc-900 td {
  color: #18181b !important;
}
[data-theme="light"] .rounded-xl.border-safety .border-zinc-600,
[data-theme="light"] .rounded-xl.border-safety .border-zinc-700 {
  border-color: #e4e4e7 !important;
}
[data-theme="light"] .rounded-xl.border-safety tbody tr:hover {
  background-color: #fafafa !important;
}
[data-theme="light"] .why-choose-us-map-bg {
  background-color: #2d2d44;
  background-image:
    linear-gradient(rgba(60, 60, 80, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 60, 80, 0.5) 1px, transparent 1px);
}
[data-theme="light"] .why-choose-us-map-bg .text-white,
[data-theme="light"] .why-choose-us-map-bg h2 {
  color: #fff !important;
}
[data-theme="light"] .why-choose-us-map-bg .text-zinc-300,
[data-theme="light"] .why-choose-us-map-bg .text-zinc-400 {
  color: #d4d4d8 !important;
}

/* Remove tap highlight on touch devices for call buttons */
.tap-highlight-none {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

/* Call-to-action pulse animation */
@keyframes pulse-strong {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.animate-pulse-strong {
  animation: pulse-strong 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Hero section with full-width tyre background */
.hero-section {
  min-height: 28rem;
  width: 100%;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  background-image: url('https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?w=1920&q=85');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,24,27,0.92) 0%, rgba(39,39,42,0.88) 50%, rgba(24,24,27,0.94) 100%);
}
.hero-images .hero-img {
  border-color: rgba(254, 222, 0, 0.4);
}
.hero-images .hero-img:hover {
  border-color: var(--color-safety);
  box-shadow: 0 0 0 2px var(--color-safety);
}

/* Quote form – fields with left icon */
.form-field-icon-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 0.5rem;
  border: 2px solid #52525b;
  background: #27272a;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field-icon-wrap:focus-within {
  border-color: #fede00;
  box-shadow: 0 0 0 1px #fede00;
}
.form-field-icon-wrap .form-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  padding: 0 0.5rem;
  background: rgba(39, 39, 42, 0.8);
  border-right: 1px solid #52525b;
  color: #fede00;
}
.form-field-icon-wrap .form-field-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.form-field-icon-wrap input,
.form-field-icon-wrap select,
.form-field-icon-wrap textarea {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  border: none;
  border-radius: 0;
  background: transparent;
}
.form-field-icon-wrap textarea {
  resize: vertical;
  min-height: 5rem;
}

/* UK-style number plate look for VRM (vehicle registration) */
.vrm-plate-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.vrm-plate-wrap .vrm-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vrm-plate-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border: 3px solid #0a0a0a;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 0 rgba(0,0,0,0.25), 0 1px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
  background: #0a0a0a;
}
.vrm-plate-gb {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  background: #003399;
}
.vrm-gb-svg {
  width: 100%;
  height: auto;
  max-height: 84px;
  display: block;
}
.vrm-plate-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0.75rem 0.9rem 0.8rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-align: center;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(180deg, #fff9e6 0%, #ffdd00 50%, #f5d000 100%);
  border: none;
  outline: none;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  transition: box-shadow 0.2s;
}
.vrm-plate-input::placeholder {
  color: #7a7a7a;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.vrm-plate-input:focus {
  box-shadow: inset 0 0 0 2px var(--color-safety);
}
@media (min-width: 640px) {
  .vrm-plate-container {
    max-width: 360px;
  }
  .vrm-plate-input {
    font-size: 1.65rem;
    letter-spacing: 0.38em;
    min-height: 56px;
    padding: 0.85rem 1rem 0.9rem;
  }
}

/* ============================================
   Responsive navbar
   ============================================ */

.nav-desktop {
  display: none;
}
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
}

.nav-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #e4e4e7;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s, color 0.2s;
}
.nav-mobile-toggle:hover {
  background: #3f3f46;
  color: #fff;
}
.nav-mobile-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-safety);
}
.nav-mobile-toggle[aria-expanded="true"] {
  background: #3f3f46;
  color: var(--color-safety);
}
@media (min-width: 768px) {
  .nav-mobile-toggle {
    display: none;
  }
}

.nav-mobile-panel {
  position: fixed;
  top: 3.5rem; /* matches h-14 */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: #18181b;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: visibility 0.2s, opacity 0.2s, transform 0.2s;
}
@media (min-width: 640px) {
  .nav-mobile-panel {
    top: 4rem; /* matches h-16 */
  }
}
body.nav-open .nav-mobile-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
@media (min-width: 768px) {
  .nav-mobile-panel {
    display: none;
  }
}

body.nav-open {
  overflow: hidden;
}
@media (min-width: 768px) {
  body.nav-open {
    overflow: auto;
  }
}

.nav-mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  color: #e4e4e7;
  transition: background-color 0.2s, color 0.2s;
}
.nav-mobile-link:hover {
  background: #3f3f46;
  color: #fff;
}

.nav-mobile-toggle[aria-expanded="true"] .nav-menu-icon-open {
  display: none;
}
.nav-mobile-toggle[aria-expanded="true"] .nav-menu-icon-close {
  display: block;
}
.nav-mobile-toggle .nav-menu-icon-close {
  display: none;
}

/* Safe area padding helper for iOS bottom bar */
.safe-area-pb {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Services page: 200x200 icon cards */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  padding: 1rem;
  background: #27272a;
  border: 2px solid #52525b;
  border-radius: 1rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}
.service-card:hover {
  border-color: #fede00;
  background: rgba(63, 63, 70, 0.6);
}
.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: rgba(254, 222, 0, 0.2);
  color: #fede00;
  margin-bottom: 0.75rem;
}
.service-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}
.service-card-desc {
  font-size: 0.75rem;
  color: #a1a1aa;
  margin: 0;
}
.service-detail {
  padding: 0.5rem 0;
  border-bottom: 1px solid #3f3f46;
}
.service-detail:last-of-type {
  border-bottom: none;
}

/* FAQ gallery slideshow */
.gallery-slideshow {
  position: relative;
  max-width: 100%;
  margin: 1.5rem auto;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #27272a;
  aspect-ratio: 16/9;
  min-height: 180px;
}
.gallery-slideshow-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gallery-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-slideshow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-slideshow-btn:hover {
  background: rgba(0,0,0,0.7);
}
.gallery-slideshow-btn.prev { left: 0.5rem; }
.gallery-slideshow-btn.next { right: 0.5rem; }
.gallery-slideshow-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2;
}
.gallery-slideshow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}
.gallery-slideshow-dot.active {
  background: #fede00;
}

/* Section titles with icon */
.section-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.section-title-icon svg {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}
@media (min-width: 640px) {
  .section-title-icon svg {
    width: 1.75rem;
    height: 1.75rem;
  }
}

/* Why Choose Us – OpenStreetMap dark-style background */
.why-choose-us-map-bg {
  background-color: #1a1a2e;
  background-image:
    linear-gradient(rgba(45, 45, 68, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 45, 68, 0.4) 1px, transparent 1px);
  background-size: 24px 24px;
}
.why-choose-us-map-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(254, 222, 0, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* London map – areas we cover */
.areas-cover-with-map {
  position: relative;
  min-height: 420px;
}
.areas-cover-bg-map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.areas-cover-bg-map .leaflet-container {
  height: 100%;
  background: #1a1a2e;
}
.areas-cover-bg-map .leaflet-control-container {
  display: none;
}
.london-map {
  width: 100%;
  height: 320px;
  min-height: 280px;
}
@media (min-width: 640px) {
  .london-map {
    height: 400px;
  }
}
.london-map-marker {
  background: none !important;
  border: none !important;
}
.london-map-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fede00;
  border: 3px solid #18181b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  position: relative;
  animation: map-dot-pulse 2s ease-in-out infinite;
}
.london-map-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #fede00;
  opacity: 0.6;
  animation: map-dot-ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes map-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.9; }
}
@keyframes map-dot-ring {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.leaflet-popup-content-wrapper {
  border-radius: 0.5rem;
  background: #27272a;
  color: #e4e4e7;
  border: 1px solid #52525b;
}
.leaflet-popup-tip {
  background: #27272a;
}
.leaflet-container a.leaflet-popup-close-button {
  color: #a1a1aa;
}
.leaflet-container a.leaflet-popup-close-button:hover {
  color: #fff;
}
