/* IPLogger Main Stylesheet
 * Contains all the CSS styles for the IPLogger website
 */

:root {
  --primary-color: #4a6ee0;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --tab-bg: #fff;
  --tab-shadow: 0 4px 24px rgba(74,110,224,0.08);
  --tab-active: #4a6ee0;
  --tab-hover: #eaf0ff;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

/* Animated SVG wave divider for hero section */
.svg-divider {
  display: block;
  width: 100%;
  height: 80px;
  margin-bottom: -2rem;
  position: relative;
  z-index: 3;
}
/* Animated gradient background for hero */
.hero-section {
  background: linear-gradient(120deg, #4a6ee0 0%, #6350b5 100%, #4a6ee0 100%);
  background-size: 200% 200%;
  animation: gradientMove 6s ease-in-out infinite alternate;
  padding: 2.5rem 0 2rem 0;
  color: white;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Card hover pop and shadow */
.feature-card {
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s;
  cursor: pointer;
  background: white;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  border: 2px solid #4a6ee0;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #3a5dbc;
  border-color: #3a5dbc;
}

.btn-danger {
  background-color: var(--danger-color);
}

.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
}
  
.b-example-divider {
  height: 3rem;
  background-color: rgba(0, 0, 0, .1);
  border: solid rgba(0, 0, 0, .15);
  border-width: 1px 0;
  box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
}

@media (min-width: 992px) {
  .rounded-lg-3 { border-radius: .3rem; }
}

#urlresult {
  transition: opacity 0.5s ease-in-out;
}

.tracker-form {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 2rem 0;
}

.code-block {
  background: #f1f1f1;
  padding: 1rem;
  border-radius: 5px;
  border-left: 4px solid var(--primary-color);
}

/* Translation support */
.language-selector {
  position: relative;
  margin-left: 15px;
}

/* Language badge */
.language-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.language-badge:hover {
  transform: scale(1.1);
}

/* Language dropdown styling */
.language-dropdown .dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.language-dropdown .dropdown-item.active {
  background-color: rgba(74, 110, 224, 0.1);
  color: var(--primary-color);
}

/* RTL support for Arabic */
[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3,
[dir="rtl"] .me-4 {
  margin-right: 0 !important;
  margin-left: 0.25rem !important;
}

[dir="rtl"] .me-2 {
  margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
  margin-left: 1rem !important;
}

[dir="rtl"] .me-4 {
  margin-left: 1.5rem !important;
}

[dir="rtl"] .text-start {
  text-align: right !important;
}

[dir="rtl"] .text-end {
  text-align: left !important;
}

/* Language transition effect */
.translating {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.dropdown-item-flag {
  width: 20px;
  height: 15px;
  margin-right: 10px;
  border-radius: 2px;
}

[dir="rtl"] .dropdown-item-flag {
  margin-right: 0;
  margin-left: 10px;
}

/* Active language indicator */
.dropdown-item .check-icon {
  opacity: 0;
  margin-left: auto;
  color: var(--primary-color);
  transition: opacity 0.2s ease;
}

.dropdown-item.active .check-icon {
  opacity: 1;
}

[dir="rtl"] .dropdown-item .check-icon {
  margin-left: 0;
  margin-right: auto;
}

@media (max-width: 992px) {
  .language-selector {
    margin-top: 10px;
  }
}
/* Responsive improvements */
@media (max-width: 576px) {
  .hero-section { padding: 1.2rem 0 0.5rem 0; }
  .tracker-form { padding: 0.7rem 0.2rem; }
  .feature-card { margin-bottom: 1.2rem; }
  .display-4, .display-5 { font-size: 2rem; }
}
/* Onboarding tooltip styles */
.onboard-tooltip {
  position: absolute;
  z-index: 9999;
  background: #fff;
  color: #222;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(74,110,224,0.18);
  padding: 1rem 1.2rem;
  font-size: 1rem;
  max-width: 260px;
  border: 2px solid #4a6ee0;
  animation: tooltipPop 0.4s cubic-bezier(.4,0,.2,1);
}
.onboard-tooltip-arrow {
  position: absolute;
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #4a6ee0;
  left: 30px;
  top: 100%;
}
@keyframes tooltipPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
/* Interactive entrance animations */
.fade-in-up { opacity: 0; transform: translateY(40px); transition: all 0.7s cubic-bezier(.4,0,.2,1); }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.fade-in-left { opacity: 0; transform: translateX(-40px); transition: all 0.7s cubic-bezier(.4,0,.2,1); }
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right { opacity: 0; transform: translateX(40px); transition: all 0.7s cubic-bezier(.4,0,.2,1); }
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* --- Modern Rounded Tabs Styling (Fit Local Page Color) --- */
.nav-tabs {
  background: var(--light-color);
  border-radius: 2.2rem 2.2rem 0 0;
  box-shadow: 0 6px 24px rgba(74,110,224,0.08);
  padding: 0.5rem 0.5rem 0 0.5rem;
  margin-bottom: 2.5rem;
  border: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
}
.nav-tabs .nav-link {
  border: none;
  border-radius: 2rem 2rem 0 0;
  color: var(--primary-color);
  background: transparent;
  font-weight: 700;
  font-size: 1.35rem;
  padding: 1.1rem 2.8rem 1.1rem 2.8rem;
  margin: 0 0.2rem;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7em;
  letter-spacing: 0.01em;
  z-index: 1;
}
.nav-tabs .nav-link .fas {
  font-size: 1.3em;
  margin-right: 0.5em;
  transition: transform 0.3s ease;
}
.nav-tabs .nav-link.active, .nav-tabs .nav-link:focus {
  background: linear-gradient(135deg, #4a6ee0 0%, #6350b5 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(74,110,224,0.15);
  z-index: 2;
  transform: translateY(-6px) scale(1.05);
}
.nav-tabs .nav-link.active .fas, .nav-tabs .nav-link:focus .fas {
  transform: scale(1.2);
}
.nav-tabs .nav-link.active::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 5px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #4a6ee0 0%, #6350b5 100%);
  box-shadow: 0 2px 8px rgba(74,110,224,0.15);
}
.nav-tabs .nav-link:hover:not(.active) {
  background: var(--tab-hover);
  color: var(--primary-color);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 4px 16px rgba(74,110,224,0.08);
}
.nav-tabs::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(74,110,224,0.2) 50%, transparent 100%);
}
.tab-content {
  position: relative;
  z-index: 1;
}
.tab-pane {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.tab-pane.fade {
  opacity: 0;
  transform: translateY(10px);
}
.tab-pane.fade.show {
  opacity: 1;
  transform: translateY(0);
}
@media (max-width: 768px) {
  .nav-tabs .nav-link {
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border-radius: 1.2rem 1.2rem 0 0;
  }
  .nav-tabs {
    gap: 0.2rem;
    padding: 0.2rem 0.1rem 0 0.1rem;
  }
  .nav-tabs .nav-link .fas {
    font-size: 1.1em;
    margin-right: 0.3em;
  }
}

/* Mobile Responsive CSS for tabs */
.tabs-wrapper {
  width: 100%;
  overflow-x: hidden;
  padding-bottom: 1px;
}

@media (max-width: 768px) {
  .nav-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  
  .nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .nav-tabs .nav-item {
    flex-shrink: 0;
  }
  
  .nav-tabs .nav-link {
    min-width: max-content;
  }
}

/* Mobile Responsive CSS for forms */
@media (max-width: 576px) {
  .tracker-form .input-group,
  #tab-ip-pane .input-group {
    flex-direction: column;
  }
  
  .tracker-form .form-control-lg,
  #tab-ip-pane .form-control-lg {
    border-radius: 0.5rem !important;
    margin-bottom: 0.75rem;
  }
  
  .tracker-form .btn,
  #tab-ip-pane .btn {
    width: 100%;
    border-radius: 0.5rem !important;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .lead {
    font-size: 1rem;
    padding: 0 15px;
  }
  
  .form-control-lg, .btn-lg {
    font-size: 1rem;
  }
  
  .hero-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}
/* --- End Modern Rounded Tabs Styling --- */
