/* WC Account Menu Header Styles */
.wc-account-menu-container {
  position: relative;
  display: inline-block;
}

.wc-account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border: none;
  background: transparent;
  text-decoration: none;
  transition: all 0.3s ease;
}

.wc-account-menu-trigger:hover {
  opacity: 0.8;
}

.wc-account-menu-trigger.logged-in {
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.user-avatar {
  display: flex;
  align-items: center;
}

.user-avatar img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.username {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
}

.dropdown-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.wc-account-menu-trigger.active .dropdown-icon {
  transform: rotate(180deg);
}

.user-icon {
  font-size: 18px;
}

.login-text {
  font-size: 14px;
  font-weight: 500;
}

/* Dropdown Menu */
.wc-account-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.wc-account-menu-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-items {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.menu-item {
  margin: 0;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #333333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.menu-link:hover {
  background-color: #f8f9fa;
  color: #333333;
}

.menu-link i {
  width: 16px;
  font-size: 14px;
  color: #6c757d;
}

/* Login Modal */
.wc-account-login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #333333;
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #333333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-group input[type="checkbox"] {
  margin-right: 8px;
}

.login-submit {
  width: 100%;
  padding: 12px;
  background: #007cba;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.login-submit:hover {
  background: #005a87;
}

.login-submit:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wc-account-menu-dropdown {
    right: -10px;
    left: -10px;
    min-width: auto;
  }

  .modal-content {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .user-info {
    display: none;
  }

  .wc-account-menu-trigger {
    padding: 6px 8px;
  }
}

/* Animation for hamburger menu effect */
.wc-account-menu-trigger.guest {
  position: relative;
}

.wc-account-menu-trigger.guest::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  opacity: 0.6;
}

/* Loading state */
.wc-account-menu-loading {
  opacity: 0.6;
  pointer-events: none;
}

.wc-account-menu-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
