/**
 * IAO Login Modal Styles
 * 
 * Stili per la modale di login
 * @package IAO_Theme
 */

/* Overlay della modale */
.iao-login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.iao-login-modal-overlay--active {
  opacity: 1;
  visibility: visible;
}

/* Container della modale */
.iao-login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.iao-login-modal--open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Header della modale */
.iao-login-modal__header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
}

.iao-login-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.iao-login-modal__close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.iao-login-modal__close:hover {
  background-color: #e0e0e0;
  color: #333;
}

.iao-login-modal__close:focus {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

/* Body della modale */
.iao-login-modal__body {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Iframe della modale */
.iao-login-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Loading spinner */
.iao-login-modal__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.iao-login-modal__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #007cba;
  border-radius: 50%;
  animation: iao-login-modal-spin 0.8s linear infinite;
}

@keyframes iao-login-modal-spin {
  to {
    transform: rotate(360deg);
  }
}

.iao-login-modal__loading-text {
  color: #666;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .iao-login-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .iao-login-modal__header {
    padding: 16px 20px;
  }
  
  .iao-login-modal__title {
    font-size: 18px;
  }
}

