/* ParaLibrary Instant Answer Widget (Themed) */

#pl-iaw-btn {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  z-index: 9999;
  background: #151515;
  color: #e8e2d4;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 0 20px rgba(178, 34, 34, 0.4);
  border: 2px solid #b22222;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: serif;
}

#pl-iaw-btn:hover {
  background: #b22222;
  color: #fff;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px rgba(178, 34, 34, 0.8);
}

#pl-iaw-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  right: 0;
  bottom: 0;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#pl-iaw-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

#pl-iaw-box {
  background: #111111;
  border: 1px solid #2a2a2a;
  border-top: 4px solid #b22222;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  width: 95%;
  max-width: 480px;
  padding: 1.25rem; /* Uniform padding on all sides */
  position: relative;
  overflow: hidden;
}

#pl-iaw-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(178, 34, 34, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

#pl-iaw-close {
  position: absolute;
  top: 1.25rem; /* Increased top margin */
  right: 1.25rem; /* Increased right margin */
  background: none;
  border: none;
  color: #888880;
  font-size: 1.5rem; /* Slightly larger for easier clicking */
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
  line-height: 1;
}

#pl-iaw-close:hover {
  color: #b22222;
}

#pl-iaw-search {
  width: 100%;
  padding: .8rem 1.2rem;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #1a1a1a;
  color: #e8e2d4;
  font-size: 1.1rem;
  margin-top: 2rem; /* Increased margin-top even more to avoid the X area entirely */
  margin-bottom: 0.75rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

#pl-iaw-search:focus {
  border-color: #b22222;
  box-shadow: 0 0 10px rgba(178, 34, 34, 0.3), inset 0 2px 4px rgba(0,0,0,0.5);
}

.pl-iaw-footer {
  font-size: 0.75rem;
  color: #888880;
  text-align: left;
  margin-bottom: 0.5rem; /* Small uniform gap at bottom after footer */
  padding-left: 0.25rem;
  font-style: italic;
  opacity: 0.8;
}

@media (max-width: 600px) {
  #pl-iaw-box {
    width: 90vw;
    padding: 2rem 1rem 1rem;
  }
}
