/* --- PleasureMapPrice: Modal & SSO Header Styles --- */

/* Glassmorphism Common Utilities */
.glass-panel {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.glass-panel-light {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* SSO Floating Header Bar */
#ssoHeaderBar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5200;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sso-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.sso-user-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sso-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  overflow: hidden;
  flex-shrink: 0;
}
.sso-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sso-app-switcher-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sso-app-switcher-btn:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* App Switcher Dropdown */
#ssoAppMenu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  border-radius: 14px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 5500;
  animation: fadeInDown 0.2s ease-out;
}
#ssoAppMenu.show {
  display: flex;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.sso-menu-header {
  font-size: 11px;
  font-weight: bold;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}

.sso-app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #f8fafc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
  cursor: pointer;
}
.sso-app-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}
.sso-app-item.active {
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(96, 165, 250, 0.4);
}

.sso-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sso-app-meta {
  display: flex;
  flex-direction: column;
}
.sso-app-desc {
  font-size: 10px;
  color: #94a3b8;
  font-weight: normal;
}

.sso-menu-footer {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
}
.sso-logout-btn {
  font-size: 11px;
  color: #f87171;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.sso-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* Custom Modal (Rule 21 Compliance) */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.custom-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.custom-modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 440px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transform: scale(0.92);
  transition: transform 0.2s ease;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.custom-modal-overlay.active .custom-modal-box {
  transform: scale(1);
}

.custom-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}
.custom-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-modal-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.15s;
}
.custom-modal-close-btn:hover {
  background: #cbd5e1;
  color: #1e293b;
}

.custom-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

.custom-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

.modal-btn {
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.modal-btn-primary {
  background: #2563eb;
  color: white;
}
.modal-btn-primary:hover {
  background: #1d4ed8;
}
.modal-btn-secondary {
  background: #e2e8f0;
  color: #475569;
}
.modal-btn-secondary:hover {
  background: #cbd5e1;
}

/* Toast Notifications */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 105000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.custom-toast {
  padding: 12px 20px;
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.25s ease-out;
  backdrop-filter: blur(10px);
}
.custom-toast.success { background: rgba(16, 185, 129, 0.95); border: 1px solid rgba(52, 211, 153, 0.4); }
.custom-toast.error { background: rgba(239, 68, 68, 0.95); border: 1px solid rgba(248, 113, 113, 0.4); }
.custom-toast.info { background: rgba(37, 99, 235, 0.95); border: 1px solid rgba(96, 165, 250, 0.4); }

@keyframes toastIn {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
