:root {
  --element-color: #c95e90;
  --text-color: #c95e90;
  --background-color: #ecdde467;
  --background-hover-color: rgb(236, 221, 228);
  --element-hover-color: #c95e90;
  --heart-loader-color: #FF5C8D;
  --background-loader-color: rgb(218, 218, 218);
  --heart-background-color: #cf5f7f;
  --font-detail-title: 'Allura', serif;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.home-body {
  min-height: 100vh;
  background: url('https://i0.wp.com/backgroundabstract.com/wp-content/uploads/edd/2022/02/5589238-e1656070245248.jpg?resize=1000%2C750&ssl=1') center/cover no-repeat;
  display: flex;
  flex-direction: column;
}

.home-header {
  padding: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.home-login-btn {
  background: none;
  border: none;
  color: rgb(167, 138, 138);;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.home-login-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.home-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  /* cambia da center a flex-start */
  padding: 2rem;
  padding-top: 20vh;  /* aggiunge padding-top di 1/3 della viewport height */
}

.home-title {
  color: var(--text-color);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.home-input-label {
  color: var(--text-color);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.home-input-container {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.home-code-input {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 3px solid transparent;
  background: white;
  font-size: 27px;
  outline: none;
  padding-right: 40px;
  text-align: center;
  background: linear-gradient(white, white) padding-box,
             linear-gradient(to right, #b1cce9, #33659a) border-box;
             
}
.home-code-input:valid {
  border-color: #4CAF50;
}

.home-code-input:invalid {
  border-color: linear-gradient(to right, #b1cce9, #33659a) border-box;
}


.home-submit-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #4CAF50;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.home-submit-btn:hover {
  background-color: #45a049;
}

.home-submit-btn::before {
  content: "✓";
  color: white;
  font-size: 14px;
}





@media (max-width: 680px) {

  
  .home-input-container {
      max-width: 280px;
  }


  .details-names {
      font-size: 2.5rem;
  }

  .details-date, .travel-title {
      font-size: 1.2rem;
  }

  .travel-mention {
    font-size: 0.9rem;
}

  .details-nav-item i {
      font-size: 1.5rem;
  }

  .details-nav-item span {
      font-size: 1rem;
  }

  .details-navigation {
      grid-template-columns: repeat(2, 1fr) !important;
      padding: 20px;
  }
}






/*--------------------- PAGINA DEI DETTAGLI -------------------------------------------------------------- */


.details-container {
 
  margin: 0 auto;
 
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.details-names {
  font-family: var(--font-detail-title);  
  font-size: 4.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  width: 100%;
  font-weight: 400;
  color: var(--text-color);
}

.detail-image{
  height: 200px;
}

.details-date {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.9;
  letter-spacing: 1px;
  width: 100%;
  color: var(--text-color);
}

.details-navigation {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 800px;
  margin-top: 2rem;
}

.details-nav-item {
  aspect-ratio: 1;
  background: var(--background-color) ;
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
  text-decoration: none;
  color: var(--element-color);
  padding: 1rem;
}

.details-nav-item:hover {
  transform: scale(1.05);
  background: var(--background-hover-color);
}

.details-nav-item i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.details-nav-item span {
  font-size: 1.2rem;
  text-align: center;
  font-weight: 300;
}



.details-background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.details-header {
  padding-bottom: 1.5rem;
  text-align: center; 
 justify-content: flex-end;
 margin-top: 50px;
}


/*--------------------- PAGINA DEL TRAVEL LIST -------------------------------------------------------------- */


/*--------------------- ANIMATION DIV -------------------------------------------------------------- */

.travel-animation-div{
  width: 100%;
  margin: auto;
  text-align: center;
}
.travel-animation-img{

  width: 80%;
  max-width: 400px;
  margin: auto;

}

.travel-header {
  padding-bottom: 1.5rem;
  text-align: center; 
 justify-content: flex-end;
 margin-top: 10px;
}


.travel-title {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.9;
  letter-spacing: 1px;
  width: 100%;
  padding: 20px;
  
}
.travel-background-overlay{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.travel-body {
  min-height: 100vh;
  color: var(--element-color);
}

.travel-animation-button{
  border-radius: 50px;
  padding: 8px 10px;
  border: none; /*3px solid #4e8b52;*/
  border-width: 3px;
  color: var(--text-color);
  background-color: #ffffff;
 cursor: pointer;
 transition: 0.8s;
 text-decoration: none;
}

.travel-animation-button:hover{
 
  background-color: #ffffff65;
  transition: 0.8s;
 
}






/*--------------------- GESTIONE PAGAMENTO -------------------------------------------------------------- */

.payment-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  
}

.modal-content {
  background-color: white;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  color: #333;
  min-height: 300px;
}

.close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}


.payment-select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.payment-details {
  margin: 15px 0;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
  display: none;
  color: #333;
}

.confirm-button {
  width: 100%;
  padding: 10px;
  background-color: var(--element-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
}

.confirm-button:hover {
  background-color: var(--element-hover-color);
}





#amount-input-layout{
  display: none;
}





/*--------------------- PAGINA DI CONFERMA -------------------------------------------------------------- */


.confirm-page * {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', system-ui, sans-serif;
}

.confirm-page {
background-color: #f5f5f5;
min-height: 100vh;
padding: 1rem;
display: flex;
flex-direction: column;
align-items: center;
}

/* Container principale */
.confirm-container {
max-width: 600px;
width: 100%;

}

/* Header */
.confirm-title {
color: #333;
text-align: center;
margin-bottom: 0.5rem;
font-size: 2rem;
}

.confirm-subtitle {
color: #575757;
text-align: center;
margin-bottom: 2rem;
font-size: 1.2rem;
font-weight: normal;
}

/* Form e campi */
.confirm-guest-list {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-bottom: 2rem;
}

.confirm-guest-card {
padding: 1.5rem;
border-radius: 20px;
border: 2px solid #ffdfe1;
transition: box-shadow 0.3s ease;
position: relative; /* Aggiunto per posizionare il bottone delete */
}

.confirm-guest-card:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.confirm-input-wrapper {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-bottom: 1rem;
text-align: center;
}

.confirm-input-wrapper:last-child {
margin-bottom: 0;
}

.confirm-label {
color: #ff4a56;
font-size: 0.9rem;
font-weight: 500;
}

.confirm-input,
.confirm-select {
padding: 0.75rem;
border: 1px solid #ffdfe1;
border-radius: 30px;
font-size: 1rem;
transition: border-color 0.2s, box-shadow 0.2s;
text-align: center;
}

.confirm-input:focus,
.confirm-select:focus {
outline: none;
border-color: #fd515d;
box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Bottoni */
.confirm-button {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 20px;
cursor: pointer;
font-weight: 600;
transition: all 0.4s;
width: 100%;
}

.confirm-button-add {
background: #ffdfe1;
color: #fd636d;
margin-bottom: 1rem;
}

.confirm-button-add:hover {
background: #ffcace;
transform: translateY(-1px);
}

.confirm-button-submit {
background: #fd636d;
color: white;
position: relative;
overflow: hidden;
}

.confirm-button-submit:hover {
background: #fd515d;
transform: translateY(-1px);
}

.confirm-button-submit:active {
transform: translateY(0);
}

/* Messaggio di successo */
.confirm-success {
display: none;
text-align: center;
color: #fd636d;
font-size: 1.2rem;
margin-top: 1rem;
padding: 1rem;
background: #ffdbdd;
border-radius: 0.5rem;
border: 1px solid #c6f6d5;
}

/* Media Queries */
@media (max-width: 480px) { 

  .details-names {
    font-size: 3rem;
   
  }


.confirm-title {
    font-size: 1.5rem;
}

.confirm-subtitle {
    font-size: 1rem;
}

.confirm-guest-card {
    padding: 1rem;
}

.confirm-delete-button {
  opacity: 1; /* Sempre visibile su mobile */
  top: 8px;
  right: 8px;
}
}


.confirm-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
backdrop-filter: blur(3px);
}

.confirm-popup {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: white;
padding: 2rem;
border-radius: 20px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
max-width: 500px;
width: 90%;
max-height: 90vh;
overflow-y: auto;
z-index: 1001;
}

.confirm-popup-title {
color: #000000;
margin-bottom: 1.5rem;
font-size: 1.5rem;
text-align: center;
}

.confirm-popup-content {
margin-bottom: 1.5rem;
}

.confirm-popup-guest {
background: #f8fafc;
padding: 1rem;
border-radius: 0.5rem;
margin-bottom: 1rem;
}

.confirm-popup-detail {
margin-bottom: 0.5rem;
color: #000000;
}

.confirm-popup-detail strong {
color: #000000;
}

.confirm-popup-buttons {
display: flex;
gap: 1rem;
justify-content: center;
}

.confirm-popup-button {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 0.25rem;
cursor: pointer;
font-weight: 600;
transition: all 0.2s;
}

.confirm-popup-button-primary {
background: #fd515d;
color: white;
border-radius:  50px;
}

.confirm-popup-button-primary:hover {
background: #fc3f4c;
}

.confirm-popup-button-secondary {
background: #ffdfe1;
color: #fd515d;
border-radius:  50px;
}

.confirm-popup-button-secondary:hover {
background: #fac6c9;
}

.gift-popup {
text-align: center;
}

.gift-popup p {
margin-bottom: 1.5rem;
line-height: 1.6;
}

.confirm-delete-button {
position: absolute;
top: -12px;
right: -12px;
width: 24px;
height: 24px;
border-radius: 50%;
background: #fc8181;
color: white;
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: all 0.2s;
opacity: 0;
pointer-events: none;
}

.confirm-guest-card:not(:first-child) .confirm-delete-button {
opacity: 1;
pointer-events: all;
}

.confirm-delete-button:hover {
background: #f56565;
transform: scale(1.1);
}

.confirm-delete-button:active {
transform: scale(0.95);
}

.confirm-guest-card:hover .confirm-delete-button {
opacity: 1;
}





.qr-box {
  display: flex;
  height: 60px;
  width: 100%;
  tab-size: 10px;
  margin-top: 10px;
}

.qr-image-section {
  width: 15%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.qr-image {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.qr-text-section {
  width: 85%;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.qr-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #333;
  font-size: 16px;
}

.qr-subtitle {
  font-size: 14px;
  margin: 0;
  color: #666;
  line-height: 1.3;
  font-size: 14px;
}






.loading-overlay {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-loader-color);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.heart-loader {
  position: relative;
  width: 80px;
  height: 80px;
  animation: heartbeat 1.2s infinite;
}

.heart-loader:before,
.heart-loader:after {
  position: absolute;
  content: "";
  left: 40px;
  top: 0;
  width: 40px;
  height: 64px;
  background: var(--heart-loader-color);
  border-radius: 40px 40px 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart-loader:after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

.loading-text {
  margin-top: 25px;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--heart-loader-color);
  text-align: center;
}


.details-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fff8f8 0%, #f0f8ff 100%);
  overflow: hidden;
  z-index: -1;
}


/* Floating Hearts Animation */
.floating-hearts {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.1;
}

.heart {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--heart-background-color) ;
  transform: rotate(45deg);
  animation: floatUp 20s linear infinite;
}

.heart::before,
.heart::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--heart-background-color) ;
}

.heart::before {
  left: -10px;
}

.heart::after {
  top: -10px;
}


@keyframes floatUp {
  0% {
      transform: translateY(100vh) rotate(45deg);
  }
  100% {
      transform: translateY(-100px) rotate(45deg);
  }
}

@keyframes move {
  0%, 100% {
      transform: translate(0, 0);
  }
  50% {
      transform: translate(30px, 20px);
  }
}



.confirm-previous {
 
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 30px;
  border: 2px solid #ffdfe1;
}

.confirm-previous h3 {
  margin: 0 0 15px 0;
  color: #333;
}

.confirm-previous-list {
  margin-bottom: 20px;
}

.confirm-previous-guest {
  padding: 10px;
  border-bottom: 2.5px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-previous-guest:last-child {
  border-bottom: none;
}

.confirm-previous-allergy {
  color: #666;
  font-size: 0.9em;
}

.confirm-previous-age {
  color: #666;
  font-size: 0.9em;
}


.back-profile-btn{
  background-color: #3182ce;
 padding: 4px 8px;
 border-radius: 20px;
 color: white;
 position: absolute;
 right: 10px;
 top: 10px;
 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
 cursor: pointer;
 transition: 0.6s;
 display: none;
}

.back-profile-btn:hover{
  background-color: #255786;
  transition: 0.6s;
 box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}



.message-input-wrapper {
  position: relative;
  width: 100%;
}

.message-textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 2px solid #ffdfe1;
  background: white;
  font-size: 16px;
  outline: none;
  min-height: 150px;
  resize: vertical;
  margin-bottom: 15px;
}

.message-success {
  display: none;
  text-align: center;
  color: #fd636d;
  font-size: 1.2rem;
  margin-top: 1rem;
  padding: 1rem;
  background: #ffdbdd;
  border-radius: 0.5rem;
  border: 1px solid #ffdfe1;
}





.info-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  border: 2px solid #ffdfe1;
  padding: 2rem;
  margin-bottom: 1rem;
}

.info-icon {
  color: var(--element-color) ;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.info-title {
  color: var(--text-color);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.map-container {
  height: 300px;
  border-radius: 15px;
  overflow: hidden;
  margin: 1rem 0;
}

.directions-btn {
  background: var(--element-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  text-decoration: none;
  transition: background-color 0.3s;
}

.directions-btn:hover {
  background: var(--element-hover-color);
}

.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--background-color);
}

.timeline-item {
  margin-left: 1.5rem;
  padding: 1rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-color);
  transform: translateX(-50%);
}

.time {
  font-weight: bold;
  color: var(--text-color);
}


.location-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-icon {
  cursor: pointer;
  color: var(--element-color);
}

.map-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  z-index: 1001;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.close-popup {
  cursor: pointer;
  font-size: 1.2em;
}

.map-container {
  height: 300px;
  margin: 15px 0;
  border-radius: 8px;
  overflow: hidden;
}









.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.back-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.back-button:hover {
  opacity: 0.7;
}

.back-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #333;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-title {
  margin-left: 16px;
  font-size: 18px;
  font-weight: 500;
  color: #333;
}