/**
 * IAO User Sidebar Styles
 * 
 * Stili per la sidebar utente del widget IAO Button Login
 * @package IAO_Theme
 */

/* Overlay - Nascosto di default */
.iao-user-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.iao-user-sidebar-overlay--active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Sidebar - Nascosta di default */
.iao-user-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  background-color: #ffffff;
  z-index: 9999;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 30px;
  box-sizing: border-box;
  /* Nascosta di default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* L'altezza verrà sovrascritta dal CSS inline generato dal widget */
}

/* Animazione Slide */
.iao-user-sidebar--slide {
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.iao-user-sidebar--slide.iao-user-sidebar--open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Animazione Fade */
.iao-user-sidebar--fade {
  transition: opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.iao-user-sidebar--fade.iao-user-sidebar--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Animazione Slide + Fade */
.iao-user-sidebar--slide-fade {
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.iao-user-sidebar--slide-fade.iao-user-sidebar--open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Bottone chiusura */
.iao-user-sidebar__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 36px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 10000;
  font-weight: 300;
}

.iao-user-sidebar__close:hover {
  color: #000;
  transform: scale(1.1);
}

.iao-user-sidebar__close:active {
  transform: scale(0.95);
}

/* Contenuto sidebar */
.iao-user-sidebar__content {
  margin-top: 20px;
}

/* Header con avatar e nome */
.iao-user-sidebar__header {
  text-align: center;
  margin-bottom: 30px;
}

.iao-user-sidebar__avatar-wrapper {
  width: 60%;
  margin: 0 auto 20px;
  position: relative;
}

.iao-user-sidebar__avatar {
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.iao-user-sidebar__title {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin: 0 0 5px 0;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.iao-user-sidebar__name {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
}

/* Separatore */
.iao-user-sidebar__separator {
  height: 1px;
  background-color: #e0e0e0;
  margin: 30px 0;
}

/* Sezioni */
.iao-user-sidebar__section {
  margin-bottom: 30px;
}

.iao-user-sidebar__section:last-child {
  margin-bottom: 0;
}

.iao-user-sidebar__section-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin: 0 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

/* Social Links */
.iao-user-sidebar__social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.iao-user-sidebar__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
}

.iao-user-sidebar__social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.iao-user-sidebar__social-link--facebook:hover {
  background-color: #1877f2;
  color: #fff;
}

.iao-user-sidebar__social-link--twitter:hover {
  background-color: #1da1f2;
  color: #fff;
}

.iao-user-sidebar__social-link--instagram:hover {
  background-color: #e4405f;
  color: #fff;
}

.iao-user-sidebar__social-link--linkedin:hover {
  background-color: #0077b5;
  color: #fff;
}

.iao-user-sidebar__social-link--website:hover {
  background-color: #007cba;
  color: #fff;
}

.iao-user-sidebar__social-link svg {
  width: 20px;
  height: 20px;
}

/* Campo */
.iao-user-sidebar__field {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.iao-user-sidebar__field:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Label campo */
.iao-user-sidebar__field-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666666;
  margin-bottom: 8px;
}

/* Valore campo */
.iao-user-sidebar__field-value {
  font-size: 16px;
  font-weight: 400;
  color: #333333;
  line-height: 1.5;
}

/* Bottone Logout */
.iao-user-sidebar__logout {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background-color: #007cba;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 30px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  border: none;
  cursor: pointer;
}

.iao-user-sidebar__logout:hover {
  background-color: #005a87;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.iao-user-sidebar__logout:active {
  transform: translateY(0);
}

/* Trigger bottone */
.iao-user-sidebar-trigger {
  cursor: pointer;
}

/* Previeni scroll body quando sidebar è aperta */
body.iao-sidebar-open {
  overflow: hidden;
}

/* Assicura che la sidebar sia sempre posizionata correttamente */
.elementor-widget-iao-button-login .iao-user-sidebar,
.elementor-widget-iao-button-login .iao-user-sidebar-overlay {
  position: fixed !important;
}

/* Responsive */
@media (max-width: 768px) {
  .iao-user-sidebar {
    width: 100% !important;
    max-width: 100%;
  }
}

