/* assets/css/dashboard.css */

/* Spinner Styles */
.spinner-overlay {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    display: none; /* Hidden by default */
    z-index: 10;
  }
  .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s linear infinite;
  }
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  /* Positioning QR Code Container */
  .qr-container {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    width: 200px; /* Ensure fixed width */
    height: 200px; /* Ensure fixed height */
  }
  
  /* Style adjustments for layout */
  .color-picker, .shape-selector {
    margin-top: 10px;
    text-align: center;
  }
  /* Responsive QR Code Canvas */
  #introQrCode, #shareQrCode {
    width: 200px !important;
    height: 200px!important;
    display: block;
    text-align: center;
  }
  /* Shape Selector Styles */
  .shape-option {
    display: inline-block;
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 5px;
    transition: border-color 0.3s;
    position: relative; /* For tooltip positioning */
  }
  .shape-option.selected {
    border-color: #09f;
  }
  .shape-option img {
    width: 50px;
    height: 50px;
  }
  /* Tooltip Styles (Optional) */
  .shape-option:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
  }

/* Dashboard UI helpers (used by dashboard + profile) */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, #00000000, #11182700);
  border: 1px solid #1f293700;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.app-logo {
  height: 38px;
  width: auto;
  display: block;
}

.app-topbar-title {
  color: #000000;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0;
}

.app-topbar-sub {
  color: #424242;
  font-size: 12px;
  margin: 0;
}

.user-menu {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.user-menu-button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: none;
  color: #000000;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.user-menu-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.user-menu-button:focus {
  outline: 2px solid rgba(239, 68, 68, 0.35);
  outline-offset: 2px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  min-width: 150px;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-item {
  display: block;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
}

.user-dropdown-item:hover {
  background: #252540;
  color: #fff;
  text-decoration: none;
}

.user-dropdown-divider {
  height: 1px;
  margin: 4px 0;
  background: #2a2a3e;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 15px rgba(15, 23, 42, 0.08);
}

@media (max-width: 575px) {
  .app-topbar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
  }
  .app-logo { height: 32px; }
  .app-topbar-title { font-size: 14px; }
  .app-topbar-sub { font-size: 11px; }
}
  
