/* =============================================
   USER WIDGET
   ============================================= */

.uw-widget {
  position: relative;
  display: inline-block;
  width: max-content;
}

/* Trigger butonu */
.uw-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0px 6px 6px;
  border-radius: 6px;
  color: inherit;
  font-size: 14px;
  transition: background 0.2s;
}

.uw-trigger:hover {
  background: rgba(0, 0, 0, 0.06);
}

.uw-trigger .fa-user-circle {
  font-size: 26px;
}

.uw-auth-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.uw-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.uw-username {
  font-weight: 500;
}

.uw-chevron {
  font-size: 11px;
  transition: transform 0.2s;
}

/* Dropdown */
.uw-dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  right: 0px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  overflow: hidden;
  transition:
    opacity 0.15s,
    visibility 0.15s;
}

.uw-logged-in .uw-dropdown {
  min-width: 180px;
  padding: 0px 6px;
}

.uw-logged-out .uw-dropdown {
  width: 250px;
}

.uw-dropdown.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Giriş yapmış kullanıcı: menü linkleri */
.uw-logged-in .uw-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s;
}

.uw-logged-in .uw-dropdown a:hover {
  background: #f3f4f6;
}

.uw-logged-in .uw-dropdown a i {
  width: 16px;
  text-align: center;
  color: #6b7280;
}

.uw-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.uw-logout {
  color: #ef4444 !important;
}

.uw-logout i {
  color: #ef4444 !important;
}

/* Giriş yapmamış: tab butonları */
.uw-tabs-nav {
  display: flex;
}

.uw-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 50%;
  justify-content: center;
  padding: 12px 8px;
  background: #f9fafb;
  border: none;
  border-bottom: 2px solid #e5e7eb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.uw-tab-btn.active {
  color: #111827;
  border-bottom-color: #111827;
  background: #fff;
}

.uw-tab-btn:hover:not(.active) {
  color: #374151;
}

/* Tab içerikleri */
.uw-tab-content {
  display: none;
  padding: 16px;
}

.uw-tab-content.active {
  display: block;
}

/* Form elemanları */
.uw-form-group {
  margin-bottom: 12px;
}

.uw-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.uw-form-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.uw-form-group input:focus {
  outline: none;
  border-color: #6b7280;
}

.uw-password-wrap {
  position: relative;
}

.uw-password-wrap input {
  padding-right: 36px;
}

.uw-show-pass {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  font-size: 13px;
}

.uw-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
  cursor: pointer;
}

.uw-submit {
  width: 100%;
  padding: 9px;
  background: #111827;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.uw-submit:hover {
  background: #1f2937;
}

.uw-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.uw-lost-pass {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
}

.uw-lost-pass:hover {
  color: #374151;
}

.uw-register-note {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Mesajlar */
.uw-message {
  font-size: 12px;
  padding: 0;
  margin-bottom: 0;
  border-radius: 6px;
}

.uw-message.error {
  background: #fef2f2;
  color: #dc2626;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.uw-message.success {
  background: #f0fdf4;
  color: #16a34a;
  padding: 8px 10px;
  margin-bottom: 10px;
}

/* Sepet toplam fiyat */
.uw-cart-total {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 6px;
}

.w-cart-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
