/* Módulo CSS: _interfaceIMVU.css */
/* =========================================
   Módulo CSS: _interfaceIMVU.css (Header, Modais e Infos do Usuário)
========================================= */

/* --- Header e Topo --- */
.store-header {
  max-width: var(--container-width);
  margin: 30px auto 40px;
  padding: 0 20px;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 25px;
}

.header-title h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 5px;
}

/* --- Barra de Controles (Busca e User) --- */
.controls-bar {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px;
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.user-selector {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.user-selector:hover {
  background: var(--bg-highlight);
  border-color: rgba(255, 255, 255, 0.1);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #333;
}

.user-info span {
  display: block;
  line-height: 1.2;
}
.u-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}
.u-label {
  font-size: 0.75rem;
  color: #666;
}

.search-wrapper {
  flex: 2;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border-radius: 12px;
  min-height: 54px;
  padding: 0 10px 0 16px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.search-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.search-floating-label {
  position: absolute;
  left: 16px;
  top: 0;
  z-index: 2;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-45%) scale(0.96);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.search-wrapper:focus-within .search-floating-label,
.search-wrapper.search-wrapper--has-value .search-floating-label {
  opacity: 1;
  transform: translateY(-55%) scale(1);
}

.search-wrapper input {
  order: 2;
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 14px 0;
  font-family: inherit;
  outline: none;
}

.search-wrapper input::placeholder {
  color: var(--text-muted);
  transition: opacity 0.18s ease;
}

.search-wrapper:focus-within input::placeholder,
.search-wrapper.search-wrapper--has-value input::placeholder {
  opacity: 0;
}

.search-icon {
  order: 1;
  width: 24px;
  flex: 0 0 24px;
  color: var(--text-muted);
  margin-right: 10px;
  overflow: hidden;
  transition:
    width 0.2s ease,
    flex-basis 0.2s ease,
    margin-right 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.search-wrapper:focus-within .search-icon,
.search-wrapper.search-wrapper--has-value .search-icon {
  width: 0;
  flex-basis: 0;
  margin-right: 0;
  opacity: 0;
  transform: scale(0.7);
}

.search-clear-button {
  order: 3;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.search-clear-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transform: scale(1.04);
}

.search-clear-button .material-symbols-outlined {
  font-size: 21px;
}

.search-clear-button[hidden] {
  display: none !important;
}

.bulk-cart-panel {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.bulk-cart-panel[hidden] {
  display: none !important;
}

.bulk-cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  max-width: min(100%, 320px);
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 38%, transparent);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.14), transparent 66%),
    rgba(255, 255, 255, 0.035);
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.bulk-cart-button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 64%, transparent);
  box-shadow: 0 18px 38px rgba(0, 212, 255, 0.1);
}

.bulk-cart-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bulk-cart-button__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.14);
  color: var(--primary);
  font-size: 20px;
}

.bulk-cart-button__text {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
  line-height: 1.2;
}

.bulk-cart-button__text strong {
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.bulk-cart-button__text small {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.bulk-cart-button__count {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.14);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.bulk-cart-button--remove {
  border-color: rgba(16, 185, 129, 0.55);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.2), transparent 60%),
    rgba(0, 212, 255, 0.05);
}

.bulk-cart-button--remove .bulk-cart-button__icon,
.bulk-cart-button--remove .bulk-cart-button__count {
  background: rgba(16, 185, 129, 0.16);
  color: var(--success);
}

/* --- Containers de Avatar em Inputs --- */
.user-info-container {
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.avatar-badge-wrapper {
  position: relative;
  width: 36px;
  height: 36px;
}
.btn-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2a2a2a;
}
.btn-level-container {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.btn-badge-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.btn-level-text {
  position: absolute;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
  font-family: "Roboto", sans-serif;
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-user-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  color: #e0e0e0;
}

/* --- Modal de Confirmação (Dark Modal) --- */
.confirmacao-modal-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  justify-content: center;
  align-items: center;
  z-index: 10001;
}

.confirmacao-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.confirmacao-card {
  position: relative;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  z-index: 10010;
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirmacao-avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
}

.confirm-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid #008c9e;
  object-fit: cover;
}

.confirm-texto-pequeno {
  color: #888;
  margin-bottom: 5px;
  font-size: 1.2rem;
  letter-spacing: 1px;
}
.avatar-texto-pequeno {
  position: relative;
  color: #888;
  top: -5px;
  margin-bottom: 5px;
  font-size: 1.2rem;
  letter-spacing: 1px;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.confirm-nome {
  color: #fff;
  margin: 5px;
  font-size: 1.5rem;
  font-family: "Roboto", sans-serif;
}
.title-models {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.confirmacao-botoes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* Responsividade de Interface */
@media (max-width: 768px) {
  .controls-bar {
    flex-direction: column;
  }
  .bulk-cart-panel {
    justify-content: flex-start;
  }
  .bulk-cart-button {
    width: auto;
    max-width: 100%;
  }
  .header-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .confirmacao-card {
    width: 85%;
    padding: 25px 20px;
  }
  .confirm-nome {
    font-size: 2rem;
  }
  .btn-confirmar-principal {
    font-size: 1rem;
    padding: 0 15px;
  }
}
