/* ============================================
   MOBILE APP STYLE HEADER
   Matches specific user design request
   ============================================ */

/* Reset body padding */
body {
  padding-top: 80px !important; /* Space for fixed header */
  background-color: #f8f9fa;
}

/* Header Container */
.ym-mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto; /* Center horizontally relative to viewport */
  width: 100%;
  max-width: 480px; /* Match body max-width */
  z-index: 9999;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* More prominent shadow */
  padding: 0.75rem 0; /* Slightly more padding */
  transition: all 0.3s ease;
  border-bottom-left-radius: 16px; /* Rounded corners for app feel */
  border-bottom-right-radius: 16px;
}

/* Scrolled State */
.ym-mobile-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Logo */
.ym-header-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Search Bar Container */
.ym-header-search-container {
  max-width: 600px; /* Limit width on desktop */
}

/* Search Form */
.ym-search-form {
  position: relative;
  width: 100%;
}

.ym-search-form .form-control {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.8rem; /* Left padding for icon */
  border-radius: 50px; /* Pill shape */
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  font-size: 0.95rem;
  color: #4b5563;
  transition: all 0.2s ease;
}

.ym-search-form .form-control:focus {
  border-color: #2e5bff;
  box-shadow: 0 0 0 3px rgba(46, 91, 255, 0.1);
  outline: none;
}

.ym-search-form .form-control::placeholder {
  color: #9ca3af;
}

.ym-search-form .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 1.1rem;
  pointer-events: none;
}

/* Auth Link (Masuk) */
.ym-auth-link {
  color: #111827; /* Dark text */
  font-weight: 700; /* Bold */
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.ym-auth-link:hover {
  color: #2e5bff;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .ym-header-logo img {
    height: 38px;
  }

  .ym-search-form .form-control {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.9rem;
  }

  .ym-auth-link {
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem;
  }
}
