/* UI Components - SmartPaisaTools.in */

/* Sticky Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

[data-theme="dark"] header {
  background-color: rgba(28, 37, 65, 0.92);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  gap: 10px;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--primary);
  border-radius: var(--radius-pill);
}

/* Header Search Engine */
.search-wrapper {
  position: relative;
  width: 280px;
}

.search-input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  pointer-events: none;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 110;
  display: none;
}

.search-result-item {
  display: block;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background-color: var(--bg-subtle);
  color: var(--primary);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Common Card Layouts */
.card {
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.card-hover {
  cursor: pointer;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.btn-primary { 
  background: var(--primary-gradient); 
  color: #FFFFFF;
}
.btn-primary:hover { 
  opacity: 0.95;
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary { 
  background: var(--bg-subtle); 
  color: var(--text-primary); 
  border: 1px solid var(--border); 
}
.btn-secondary:hover { 
  background: var(--border); 
}

.btn-outline { 
  background: transparent; 
  color: var(--primary); 
  border: 1.5px solid var(--primary); 
}
.btn-outline:hover { 
  background: var(--primary-light); 
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 24px 0 20px;
}

.breadcrumb a {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span.separator {
  color: var(--text-muted);
}

.breadcrumb span.current {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tables Styling */
.table-responsive {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1.5px solid var(--border);
  font-family: var(--font-heading);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: var(--bg-light);
}

/* Footer Styling */
footer {
  background-color: var(--white);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 64px;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 16px;
  line-height: 1.7;
  max-width: 320px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* Mobile Sticky Bottom Nav */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  display: none;
  justify-content: space-around;
  align-items: center;
  z-index: 99;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  flex: 1;
  height: 100%;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  margin-bottom: 3px;
}

.mobile-nav-item.active {
  color: var(--primary);
}
