/* ===================================================================
   HEADER TOP COMPONENT STYLES
   Modern, performance-optimized styles for the header top section
   Uses CSS Grid, Flexbox, and modern CSS features
   Mobile-first responsive design
   =================================================================== */

/* ===================================================================
   1. COMPONENT CONTAINER
   =================================================================== */

.header-top {
  background-color: #000000;
  color: #ffffff;
  position: sticky;
  top: 0;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  line-height: 1.2;
  z-index: var(--z-header-top);
}

/* Golden gradient bottom border */
.header-top::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: #f6d55a;
}

.header-top__container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'phone actions mobile-toggle';
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ===================================================================
   2. PHONE SECTION
   =================================================================== */

.header-top__phone {
  grid-area: phone;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
}

.header-top__phone-icon {
  font-size: 18px;
  color: #f6d55a;
}

.header-top__phone-label {
  margin-right: 0.25rem;
}

.header-top__phone-link {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.header-top__phone-link:hover,
.header-top__phone-link:focus {
  color: #f6d55a;
  text-decoration: none;
}

/* ===================================================================
   3. ACTIONS SECTION
   =================================================================== */

.header-top__actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.header-top__auth,
.header-top__functions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ===================================================================
   4. AUTHENTICATION LINKS
   =================================================================== */

.header-top__auth-link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  font-size: 14px;
}

.header-top__auth-link:last-child {
  border-right: none;
}

.header-top__auth-link:hover,
.header-top__auth-link:focus {
  color: #f6d55a;
  text-decoration: none;
}

.header-top__auth-link i {
  font-size: 14px;
}

/* Profile link styling */
.header-top__profile-link {
  border-right: 1px solid #ffffff;
}

.header-top__username {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.header-top__usertype {
  font-size: 12px;
  opacity: 0.8;
  font-weight: normal;
}

/* ===================================================================
   5. FUNCTIONAL BUTTONS (SEARCH & CART)
   =================================================================== */

.header-top__function-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 0.625rem;
  background: none;
  border: none;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-top__function-btn:hover,
.header-top__function-btn:focus {
  color: #f6d55a;
  text-decoration: none;
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

.header-top__function-btn i {
  font-size: 14px;
  padding: 0 0.5rem;
}

.header-top__function-label {
  font-size: 14px;
  color: white;
}

/* ===================================================================
   6. CART SPECIFIC STYLING
   =================================================================== */

.header-top__cart {
  position: relative;
  padding: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-top__cart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f6d55a;
  padding: 5px 15px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-left: 0.25rem;
  gap: 10px;
  font-size: 14px;
  height: 100%;
  font-weight: bold;
}

.header-top__cart .header-top__function-label,
.header-top__cart-total {
  color: black;
}

/* ===================================================================
   7. MOBILE MENU TOGGLE
   =================================================================== */

.header-top__mobile-toggle {
  grid-area: mobile-toggle;
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  padding: 0.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-top__mobile-toggle:hover,
.header-top__mobile-toggle:focus {
  color: #f6d55a;
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================================================================
   8. RESPONSIVE DESIGN
   =================================================================== */

/* Tablet styles */
@media (max-width: 1199px) {
  .header-top__container {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
  }

  .header-top__phone {
    font-size: 20px;
  }

  .header-top__actions {
    gap: 0.5rem;
  }
}

/* Mobile styles */
@media (max-width: 991px) {
  .header-top__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .header-top__phone {
    font-size: 20px;
    flex-shrink: 0;
  }

  .header-top__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .header-top__functions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .header-top__function-label:not(.header-top__function-label-cart) {
    display: none;
  }

  .header-top__mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: var(--touch-target-min);
    flex-shrink: 0;
  }
}

/* Small mobile styles */
@media (max-width: 767px) {
  .header-top__container {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .header-top__phone {
    font-size: 18px;
  }

  .header-top__phone-label {
    display: none;
  }

  .header-top__function-btn {
    padding: 0.375rem;
  }

  .header-top__auth {
    display: none;
  }
}

/* Extra small mobile styles */
@media (max-width: 575px) {
  .header-top__container {
    padding: 0.375rem 0.5rem;
  }

  .header-top__phone {
    font-size: 14px;
  }

  .header-top__phone-icon {
    font-size: 14px;
  }

  .header-top__function-btn i {
    font-size: 14px;
  }
}

/* ===================================================================
   9. ACCESSIBILITY ENHANCEMENTS
   =================================================================== */

/* Focus support */
.header-top__auth-link:focus,
.header-top__function-btn:focus,
.header-top__phone-link:focus,
.header-top__mobile-toggle:focus {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}
