/**
 * SYNTO Widget Embed - Styles
 * Versione: 1.2
 * Widget chatbot-style (bottom-right corner)
 *
 * Coerente con modal.css - stesse proprietà base
 */

/* === WIDGET CONTAINER === */
#synto-widget-container {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 500px;
  height: 630px;
  min-width: 320px;
  min-height: 400px;
  max-width: 90vw;
  max-height: 630px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 99998;
}

/* === RESIZE HANDLE - Alto Sinistra === */
#synto-widget-resize {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 100001;
  background: linear-gradient(135deg, rgba(33,150,243,0.6) 0%, rgba(33,150,243,0.6) 50%, transparent 50%);
  border-top-left-radius: 12px;
}

#synto-widget-resize:hover {
  background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.5) 50%, transparent 50%);
}

#synto-widget-container.active {
  display: block;
}

/* === CLOSE BUTTON === */
#synto-widget-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#synto-widget-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* === IFRAME === */
#synto-widget-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
  transition: opacity 0.15s ease-in;
}

/* === TOGGLE BUTTON === */
#synto-widget-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #2196f3;
  color: #fff;
  cursor: pointer;
  z-index: 99997;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

#synto-widget-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
}

#synto-widget-toggle.hidden {
  display: none;
}

#synto-widget-toggle svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 5px;
}

/* === TABLET === */
@media (max-width: 1024px) {
  #synto-widget-container {
    width: 380px;
    height: 560px;
  }
}

/* === MOBILE === */
@media (max-width: 768px) {
  #synto-widget-container {
    width: 100vw !important;
    height: 100vh !important;
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
  }

  #synto-widget-resize {
    display: none;
  }

  #synto-widget-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  #synto-widget-toggle {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}
