/* Account area — motion, hover, entrance animations */

@keyframes account-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes account-scale-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes account-shine {
  from {
    background-position: 200% center;
  }
  to {
    background-position: -200% center;
  }
}

@keyframes account-pulse-soft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Tab panels */
.account-tab-area-start .tab-pane.active.show {
  animation: account-fade-up 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Sidebar nav */
.account-dashboard-nav .nav-link {
  transition:
    border-color 0.25s ease,
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.account-dashboard-nav .nav-link:not(.active):hover {
  transform: translateX(5px);
  box-shadow: 0 4px 14px rgba(192, 2, 8, 0.1);
}

.account-dashboard-nav .nav-link.active {
  transition: background 0.25s ease, transform 0.25s ease;
}

.account-dashboard-nav .nav-link i {
  transition: transform 0.25s ease;
}

.account-dashboard-nav .nav-link:hover i {
  transform: scale(1.12);
}

/* Hub cards */
.account-hub-card,
.account-addresses-shell,
.account-addresses-billing-v2,
.account-profile-main,
.account-profile-card {
  transition: box-shadow 0.3s ease;
}

/* Dashboard welcome */
.account-dash-welcome {
  animation: account-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

.account-dash-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.account-dash-welcome:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(192, 2, 8, 0.32);
}

.account-dash-welcome:hover::before {
  opacity: 1;
  animation: account-shine 1.4s ease;
}

.account-dash-welcome-avatar {
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.account-dash-welcome:hover .account-dash-welcome-avatar {
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.account-dash-welcome h3,
.account-dash-welcome p {
  position: relative;
  z-index: 1;
}

.account-dash-welcome a {
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.account-dash-welcome a:hover {
  letter-spacing: 0.02em;
}

/* Stats */
.account-dash-stat {
  animation: account-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.account-dash-stat:nth-child(1) {
  animation-delay: 0.1s;
}

.account-dash-stat:nth-child(2) {
  animation-delay: 0.18s;
}

.account-dash-stat:nth-child(3) {
  animation-delay: 0.26s;
}

.account-dash-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 2, 8, 0.25);
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 31, 37, 0.08);
}

.account-dash-stat:hover strong {
  color: var(--color-primary);
}

.account-dash-stat i {
  transition: transform 0.3s ease;
}

.account-dash-stat:hover i {
  transform: scale(1.15);
}

/* Quick actions */
.account-dash-quick-btn {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.account-dash-quick-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(192, 2, 8, 0.1);
}

.account-dash-quick-btn:active {
  transform: translateY(-1px);
}

.account-dash-quick-icon {
  transition: transform 0.3s ease, background 0.3s ease;
}

.account-dash-quick-btn:hover .account-dash-quick-icon {
  transform: scale(1.1) rotate(-4deg);
  background: var(--color-primary);
  color: #fff;
}

/* Recent order strip */
.account-dash-recent {
  animation: account-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.account-dash-recent:hover {
  transform: translateY(-2px);
  border-color: rgba(192, 2, 8, 0.3);
  box-shadow: 0 6px 18px rgba(31, 31, 37, 0.06);
}

.account-order-view {
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    background 0.25s ease;
}

.account-order-view:hover {
  transform: translateX(4px);
}

.account-order-view:hover i {
  transform: translateX(3px);
}

.account-order-view i {
  transition: transform 0.25s ease;
  display: inline-block;
}

/* Order list rows */
.account-order-item {
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.account-order-item:hover {
  background: rgba(192, 2, 8, 0.04);
  box-shadow: inset 4px 0 0 var(--color-primary);
}

.account-order-status {
  transition: transform 0.25s ease;
}

.account-order-item:hover .account-order-status {
  transform: scale(1.05);
}

/* Track panel */
.account-track-info {
  transition: box-shadow 0.35s ease, filter 0.35s ease;
  position: relative;
  overflow: hidden;
}

.account-track-info::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.account-track-panel:hover .account-track-info {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  filter: brightness(1.05);
}

.account-track-panel:hover .account-track-info::before {
  opacity: 1;
  animation: account-shine 1.4s ease;
}

.account-track-panel:hover .account-track-info-icon {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.28);
}

.account-track-form-wrap input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.account-track-form-wrap input:focus {
  box-shadow: 0 0 0 3px rgba(192, 2, 8, 0.12);
}

.account-track-result.is-visible {
  animation: account-fade-up 0.45s ease both;
}

.account-track-form-wrap .rts-btn.btn-primary {
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.account-track-form-wrap .rts-btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(192, 2, 8, 0.25);
}

/* Address cards */
.account-address-item {
  animation: account-scale-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  cursor: pointer;
}

.account-addresses-list > .account-address-item:nth-child(1) {
  animation-delay: 0.05s;
}

.account-addresses-list > .account-address-item:nth-child(2) {
  animation-delay: 0.12s;
}

.account-addresses-list > .account-address-item:nth-child(3) {
  animation-delay: 0.19s;
}

.account-addresses-list > .account-address-item:nth-child(4) {
  animation-delay: 0.26s;
}

.account-address-item:hover {
  border-color: var(--color-primary);
}

.account-address-item.is-default:hover {
  box-shadow: 0 12px 28px rgba(192, 2, 8, 0.2);
}

.account-address-action-btn {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.account-address-action-btn:hover {
  transform: scale(1.08);
}

.account-address-action-btn:active {
  transform: scale(0.96);
}

.account-address-icon {
  transition: transform 0.3s ease;
}

.account-address-item:hover .account-address-icon {
  transform: scale(1.05);
}

.account-addresses-add-tile:hover .account-addresses-add-tile-icon {
  animation: account-pulse-soft 0.8s ease;
}

.account-addresses-add-btn,
.account-addresses-toolbar .rts-btn.btn-primary {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.account-addresses-add-btn:hover,
.account-addresses-toolbar .rts-btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(192, 2, 8, 0.25);
}

/* Profile */
.account-profile-card {
  animation: account-fade-up 0.5s ease both;
}

.account-profile-main {
  animation: account-fade-up 0.5s 0.1s ease both;
}

.account-profile-card:hover {
  box-shadow: 0 8px 24px rgba(31, 31, 37, 0.08);
}

.account-profile-btn-edit {
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.account-profile-btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(192, 2, 8, 0.25);
}

.account-profile-meta li {
  transition: transform 0.25s ease, color 0.25s ease;
}

.account-profile-card:hover .account-profile-meta li:hover {
  transform: translateX(4px);
}

.account-addresses-alert.is-success,
.account-addresses-alert.is-error,
.account-profile-panel .account-profile-alert.is-success,
.account-profile-panel .account-profile-alert.is-error {
  animation: account-fade-up 0.4s ease both;
}

/* Billing toggle */
.account-addresses-toggle-row:hover .account-addresses-toggle-label {
  color: var(--color-primary);
}

.account-addresses-billing-v2 {
  animation: account-fade-up 0.5s 0.15s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .account-tab-area-start .tab-pane.active.show,
  .account-dash-welcome,
  .account-dash-stat,
  .account-dash-recent,
  .account-address-item,
  .account-profile-card,
  .account-profile-main,
  .account-addresses-billing-v2,
  .account-track-result.is-visible {
    animation: none;
  }

  .account-dash-welcome:hover,
  .account-dash-stat:hover,
  .account-dash-quick-btn:hover,
  .account-address-item:hover,
  .account-dash-recent:hover,
  .account-dashboard-nav .nav-link:hover {
    transform: none;
  }
}
