/* === PLANS.CSS (updated: X close + icons inside boxes) */

.plans-section {
  background: url('homepageimage2.PNG') no-repeat center center/cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 120px;
}

/* Box dei piani */
.plan-box {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid white;
  color: white;
  width: 250px;
  height: 250px;
  margin: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  text-align: center;
  padding: 20px;
  position: relative; /* necessario per posizionare le “i” dentro il box */
  z-index: 1;
}

/* Icona STANDARD (sinistra del box) */
.standard-box .info-icon-left {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 1.3rem;
  color: #ff4a4a;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
}

/* Icona PRO (destra del box) */
.pro-box .info-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.3rem;
  color: #ff4a4a;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
}

/* Effetto hover */
.info-icon-left:hover,
.info-icon:hover {
  transform: scale(1.2);
}

/* Box info (small tooltip style fallback) */
.info-box {
  position: fixed;
  top: 60px;
  right: 20px;
  background: rgba(0, 0, 0, .85);
  padding: 20px;
  border-radius: 8px;
  max-width: 300px;
  font-size: .9rem;
  display: none;
  z-index: 19;
  border: 1px solid #fff;
}

/* TEXT / BUTTONS inside plan boxes */
.plan-box h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #ff4a4a;
}

.plan-box button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #ff4a4a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.plan-box button:not(:disabled):hover {
  background-color: white;
  color: black;
}

.plan-box button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #ff4a4a;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.plan-box button:not(:disabled):hover {
  background-color: white;
  color: black;
}

.plan-box button:disabled,
.plan-box button.loading {
  background-color: #b33a3a; /* rosso meno saturo */
  color: #ffeaea;
  cursor: not-allowed;
  opacity: 0.9;
  filter: brightness(0.85);
}

.message {
  margin-top: 15px;
  color: #ff4a4a;
  font-size: 0.9rem;
}

/* === FULLSCREEN INFO OVERLAY === */
.info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none; /* shown by JS when needed */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

.info-content {
  position: relative; /* serve per ancorare la X */
  background: rgba(255, 74, 74, 0.1);
  border: 2px solid #ff4a4a;
  border-radius: 20px;
  color: #fff;
  font-family: "Russo One", sans-serif;
  text-align: left;
  box-shadow: 0 0 30px rgba(255, 74, 74, 0.5);

  width: 85%;
  max-width: 700px;
  padding: 40px 60px;
  max-height: 80vh;
  overflow-y: auto;
}

/* testo dentro overlay */
.info-content h2 {
  font-size: 1.8rem;
  color: #ff4a4a;
  margin-bottom: 15px;
}

.info-content p {
  color: #eee;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* === CLOSE X STYLES === */
.close-x {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s ease, transform 0.12s ease;
  z-index: 1001;
}

.close-x:hover {
  color: #ff4a4a;
  transform: scale(1.15);
}

#pro-price {
  visibility: hidden;
}

.btn-confirm-install {
  margin-top: 18px;
  padding: 12px 26px;
  background: linear-gradient(135deg, #ff3b3b, #d40000);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-confirm-install:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

/* === MOBILE ADAPTATIONS === */
@media (max-width: 768px) {
  .plan-box {
    width: 90%;
    height: auto;
    margin: 12px;
    padding: 22px;
  }

  .standard-box .info-icon-left,
  .pro-box .info-icon {
    font-size: 1.4rem;
    top: 10px;
  }

  /* ✅ NON mettere un left fisso */
  .standard-box .info-icon-left {
    left: 12px;
  }

  .pro-box .info-icon {
    right: 12px;
  }

  .info-content {
    width: 92%;
    padding: 20px;
    max-height: 75vh;
  }

  .close-x {
    top: 8px;
    right: 10px;
    font-size: 1.6rem;
  }
}

.mini-loader {
  width: 14px;
  height: 14px;
  border: 2px solid #aaa;
  border-top: 2px solid transparent;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.browser-warning-content h2 {
  color: #ff4a4a;
  letter-spacing: 0.6px;
}

.browser-warning-link-box {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-all;
}

.browser-warning-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.browser-warning-copied {
  min-height: 22px;
  margin-top: 12px;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
}