:root {
  --brand-color: #fc8019; /* Swiggy-like vibrant orange */
  --brand-hover: #e06c11;
  --dark-bar-bg: #332f2b; /* Dark coffee/grey from user image */
  --brand-soft: rgba(252, 128, 25, 0.1);
  --brand-medium: rgba(252, 128, 25, 0.2);
  --bg-color: #f8f9fa;
  --text-dark: #3d4152;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 0;
  background-color: var(--bg-color);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #3d4152;
  /* Swiggy text dark */
}

/* Button & Focus adjustments */
.btn:focus,
.btn:active:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(252, 128, 25, 0.25) !important;
  border-color: var(--brand-color) !important;
}

/* Brand overrides */
.btn-primary {
  background-color: var(--brand-color);
  border-color: var(--brand-color);
  color: white;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  background-color: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}

.text-primary {
  color: var(--brand-color) !important;
}

.bg-primary {
  background-color: var(--brand-color) !important;
}

.bg-brand-soft {
  background-color: var(--brand-soft) !important;
}

.btn-outline-primary {
  color: var(--brand-color);
  border-color: var(--brand-color);
}

.btn-outline-primary:hover {
  background-color: var(--brand-color);
  color: white;
}

/* Base Card structure for Food App look */
.app-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
}

.app-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.hover-scale {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: translateY(-4px) scale(1.01);
}

.transition-all {
  transition: all 0.3s ease;
}

.shadow-inner {
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.glass-morphism {
  background: rgba(255, 255, 255, 0.85); /* Increased opacity for better visibility */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-brand {
    background: rgba(252, 128, 25, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(252, 128, 25, 0.15);
}

/* Layout Utilities */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Scrollable form handling */
.form-card-container {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding: 10px;
  scrollbar-width: thin;
}

.form-card-container::-webkit-scrollbar {
  width: 6px;
}

.form-card-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* Sticky layout improvements */
.sticky-top {
  z-index: 1020;
}

.auth-card {
  transition: all 0.3s ease;
}

.input-group-text {
  border-color: #eee;
}

input.form-control,
textarea.form-control {
  border-color: #eee;
}

input.form-control:focus,
textarea.form-control:focus {
  background-color: #fff;
}

/* Modern Role Switcher Styles */
.role-switcher-container {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 50px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.role-btn {
    padding: 6px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.role-btn i {
    font-size: 1rem;
}

.role-btn:hover {
    color: var(--brand-color);
}

.role-btn.active {
    color: white;
    background: var(--brand-color);
    box-shadow: 0 4px 12px rgba(252, 128, 25, 0.25);
}

.role-btn.active[href*="Shopkeeper"] {
    background: #10b981; /* Success Green for Shop Mode */
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Improved image object-fit */
.image-cover {
    object-fit: cover !important;
    font-family: 'object-fit: cover;'; /* polyfill */
}

.image-contain {
    object-fit: contain !important;
    font-family: 'object-fit: contain;'; /* polyfill */
}

.shop-card-img {
    height: 160px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hover-lift:hover .shop-card-img {
    transform: scale(1.05);
}

.sticky-top-offset {
    top: 72px !important; /* Offset for the navbar height */
}

@media (max-width: 991.98px) {
    .sticky-top-offset {
        top: 60px !important;
    }
}

/* Section Header Bars (Requirement: Dark BG, Orange Text) */
.section-header-bar {
    background-color: var(--dark-bar-bg);
    color: var(--brand-color);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-header-bar h4, 
.section-header-bar h5, 
.section-header-bar h2 {
    color: var(--brand-color) !important;
    margin-bottom: 0;
    font-weight: 700;
}

.section-header-bar i {
    color: var(--brand-color);
    font-size: 1.4rem;
}

/* Badge Improvements (Higher contrast) */
.bg-success.bg-opacity-10 {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.bg-warning.bg-opacity-10 {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.object-fit-cover {
    object-fit: cover !important;
}

.object-fit-contain {
    object-fit: contain !important;
}

/* Fix radio button spacing for overlapping issues */
.gender-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.5rem 0;
}

@media (max-width: 576px) {
    .gender-radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 991.98px) {
    .role-switcher-container {
        width: 100%;
        justify-content: center;
    }
    .role-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ─── VOICE SEARCH FIXES ─── */

@keyframes pulseMic {
    0% { transform: scale(1); opacity: 1; text-shadow: 0 0 0 rgba(220, 53, 69, 0); }
    50% { transform: scale(1.15); opacity: 0.8; text-shadow: 0 0 10px rgba(220, 53, 69, 0.4); }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 0 rgba(220, 53, 69, 0); }
}

.voice-pulse-anim {
    animation: pulseMic 1.2s infinite ease-in-out;
    display: inline-block;
}