/* Aseguramos que el modal y su contenido no se vean afectados por otros estilos globales */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden; /* Evita el desbordamiento horizontal */
}

/* Estilo del modal de WhatsApp */
#whatsappModal {
    display: none; /* Modal oculto al principio */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* El modal debe ocupar todo el ancho de la pantalla */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(73 71 71 / 70%); /* Menos opaco para mayor transparencia */
    backdrop-filter: blur(30px); /* Menos desenfoque */
}

/* Estilo del contenido del modal */
#modalContent {
    background: rgba(73 71 71 / 0%); /* Menos opaco para mayor transparencia */
    padding: 20px;
    border-radius: 10px;
    max-width: 380px; /* Limita el ancho máximo */
    width: 100%; /* Se asegura que ocupe el 100% del ancho permitido */
    box-sizing: border-box;
    text-align: center;
    margin: 0 20px; /* Espaciado alrededor para evitar que se pegue a los bordes */
    color: #fff; /* Color del texto para que sea legible sobre el fondo */
}


/* Estilo para el campo de número de teléfono */
#phoneNumber {
    width: calc(105% - 17px);
    padding: 10px;
    margin: 18px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* Contenedor de inputs de teléfono */
.phone-input-wrapper {
  width: 100%;
  margin-bottom: 10px;
}

/* Estilo del selector de país */
.country-select-style {
  width: 100%;
  padding: 14px 15px;
  border: 2px solid #d0d0d0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 12px;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
  position: relative;
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Forzar que el dropdown aparezca centrado */
.country-select-style:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
  outline: none;
  transform: none;
  position: relative;
  left: 0;
  right: 0;
}

/* Estilo para las opciones del dropdown */
.country-select-style option {
  padding: 12px;
  background: var(--primary-color);
  color: white;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  direction: ltr;
  display: block;
  width: 100%;
}

/* Forzar centrado del dropdown en todos los navegadores */
.country-select-style::-ms-expand {
  display: none;
}

/* Estilo específico para WebKit (Chrome, Safari) */
.country-select-style::-webkit-calendar-picker-indicator {
  display: none;
}

/* Asegurar que el dropdown esté centrado */
.country-select-style:active,
.country-select-style:focus {
  transform: translateX(0) !important;
  left: 0 !important;
  right: 0 !important;
}

/* Estilos para el input de número */
.phone-number-input {
  width: 100%;
  padding: 14px 15px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
}

.phone-number-input:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.15);
}

.phone-number-input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
  outline: none;
  background: rgba(255, 255, 255, 0.15);
}

.phone-number-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-weight: normal;
}

@media (max-width: 480px) {
  .country-select-style {
    font-size: 14px;
    padding: 12px 40px 12px 12px;
  }
  
  .phone-number-input {
    font-size: 15px;
    padding: 12px;
  }
}

/* Estilo de los botones */
.modal-button {
    padding: 10px 20px;
    border-radius: 5px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.modal-button.cancel-button {
    background: #848484; /* Rojo para el botón cancelar */
}

.modal-button:hover {
    opacity: 0.8;
}

/* Estilo para el número de teléfono (rojo) */
.phoneNumber {
    color: white; /* Rojo para el texto del número de teléfono */
    margin-bottom: 30px; /* Espacio adicional debajo del texto */
    display: block;
}

/* Aseguramos que el modal no se desborde en pantallas más grandes */
@media (min-width: 768px) {
    #modalContent {
        width: 380px; /* Ancho fijo de 380px en pantallas grandes */
    }
}
