/* CSS personalizado para SurveyJS */




/*
***Survey Form Header
*/

#surveyContainer .sd-root-modern .sd-container-modern__title{
    background: none !important;
}

#surveyContainer .sd-title.sd-container-modern__title{
    box-shadow: none !important;
}

#surveyContainer .sd-body{
 padding: 0 10px;
}

#surveyContainer .sd-root-modern.sd-root-modern--mobile{
    --sd-base-padding: calc(3 * var(--sjs-base-unit, var(--base-unit, 8px)));
}

@media screen and (min-width: 701px) {
    #surveyContainer .sd-body{
        /*padding: 10px 0px;*/
        padding: 0 calc(5*(var(--sjs-base-unit, var(--base-unit, 8px))));
    }

    #surveyContainer .sd-root-modern.sd-root-modern--mobile{
        --sd-base-padding: calc(5 * var(--sjs-base-unit, var(--base-unit, 8px)));
    }
}


#surveyContainer .sd-header__text .sd-title{
    color: var(--myHeadersColor);
    text-align: center;
}

.newsmatic_dark_mode #surveyContainer .sd-header__text .sd-title{
    color: var(--myHeadersColor);
}

#surveyContainer .sd-header__text h3{
    font-size: 1.5em;
}

/*
***Survey Container transparent background
*/
#surveyContainer .sd-root-modern{
    background-color: rgba(0, 0, 0, 0.0) !important;
}

.newsmatic_dark_mode #surveyContainer .sd-root-modern{
    background-color: rgba(255, 255, 255, 0.0) !important;
}


/*
***Survey Body
*/
#surveyContainer .sd-body {
    background-color:var(--mySDBody-back);
    border-radius: 8px;
    padding: 20px;
}

.newsmatic_dark_mode #surveyContainer .sd-body {
    background-color:var(--mySDBodyDark-back);
    border-radius: 8px;
    padding: 20px;
}


/*
***Question Container
*/

/*Question container*/ 
#surveyContainer .sd-question{
    background-color: rgba(63, 63, 63, 0.02);
    margin-bottom: 20px;
}

.newsmatic_dark_mode #surveyContainer .sd-question {
    background-color: rgba(163, 163, 163, 0.05);
}

/*When focused*/
/*#surveyContainer .sd-question:focus-within{
    border-left: 4px solid #f06626 !important;
}*/
 


/*
***Question Header
*/

/*Question header container*/
#surveyContainer .sd-question__title {
    font-family: 'Merriweather-Regular', serif !important;
    font-size: 1.7em !important;
    text-transform: uppercase;
}

.newsmatic_dark_mode #surveyContainer .sd-question__title {
    color:rgb(205, 244, 255);
}


/*
***Errors Style
*/
/*Error multitext container */
#surveyContainer .sd-question__erbox--outside-question{
    margin-top: 5px;
    text-align: center;
}
/*Erorr box text */
#surveyContainer .sd-question__erbox{
    font-family: 'Times New Roman', Times, serif;
    font-size:  1em;
}



/*
***Field Container Styles
*/
/*Multitext label part */
#surveyContainer .sd-multipletext__item-title span{
    font-size: 16px;
}

/*Multitext input field part (first just multipart, second any input)*/
#surveyContainer .sd-multipletext .sd-input, #surveyContainer .sd-input{
    background-color: rgba(70, 79, 85, 0.05) ;
}

.newsmatic_dark_mode #surveyContainer .sd-multipletext .sd-input, .newsmatic_dark_mode #surveyContainer .sd-input{
    background-color: rgba(127, 207, 241, 0.05);
}


/*************
***Input Style
*************/

/******
*Global
*******/

#surveyContainer .sd-multipletext--mobile .sd-multipletext__item-title{
    max-width: 18%;
    margin-right: 10px;
}
/*Hide multipletext item title on focusin (showing counter text counter) to avoid wrap*/
#surveyContainer .sd-multipletext--mobile:focus-within .sd-multipletext__item-title{
    display: none;   
}
#surveyContainer .sd-multipletext--mobile .sd-multipletext__item-container--answered{
    flex-direction: row;
    align-items: center;  
    justify-content: flex-start;
}
/*Allow input to take all available space*/
#surveyContainer .sd-multipletext--mobile .sd-multipletext__input {
    flex-grow: 1;
}


#surveyContainer .sd-question__content > .sd-input:focus, 
#surveyContainer .sd-multipletext__item-container.sd-input:focus-within,
#surveyContainer .sd-input.sd-dropdown:focus-within
{
    box-shadow: 0 0 0 2px #148dea !important;
}

/*Padding de los inputs a nivel general*/
/*Disminuye el padding en moviles first, para evitar que los inputs se hagan muy dimunutos*/
#surveyContainer .sd-element--with-frame{
    padding-left: 8px;
    padding-right: 8px;    
}

/*Regresa al estilo original para pantallas de mas de 50 pixeles */
@media screen and (min-width: 600px) {
    #surveyContainer .sd-element--with-frame{
        padding-left: calc(var(--sd-base-padding) + var(--sv-element-add-padding-left, 0px));
        padding-right: calc(var(--sd-base-padding) + var(--sv-element-add-padding-right, 0px));    
    }   
}


/**********************************
Fix input remmainning counters
***********************************/
/*Counter */
#surveyContainer .sd-remaining-character-counter{
    color: rgb(3, 37, 95);
    opacity: 0.9;
}
/*Make counter to appear below textare box without affecting multipletext line*/
.sd-comment__content > .sd-remaining-character-counter{
    inset-block-end: -25px;
}

#surveyContainer .sd-multipletext__item input[type="text"], #surveyContainer .sd-multipletext__item input[type="email"],
#surveyContainer .sd-multipletext__item input[type="url"], #surveyContainer .sd-multipletext__item input[type="password"],
#surveyContainer .sd-multipletext__item input[type="search"], #surveyContainer .sd-multipletext__item input[type="number"],
#surveyContainer .sd-multipletext__item input[type="tel"], #surveyContainer .sd-multipletext__item input[type="range"],
#surveyContainer .sd-multipletext__item input[type="date"], #surveyContainer .sd-multipletext__item input[type="month"],
#surveyContainer .sd-multipletext__item input[type="week"], #surveyContainer .sd-multipletext__item input[type="time"],
#surveyContainer .sd-multipletext__item input[type="datetime"], #surveyContainer .sd-multipletext__item input[type="datetime-trendy"],
#surveyContainer .sd-multipletext__item input[type="color"]{
    width: 100%;
}
/*Day*/
/*Multi-text title text*/
#surveyContainer .sd-multipletext__item-title{
    color: rgb(66, 66, 66);
    opacity: 0.7;
}
/*Required color*/
#surveyContainer .sd-question__required-text{
    color: #c13d11;
}



/*DropDown Selection List Color*/
#surveyContainer .sv-popup__content {
    background-color: rgba(63, 63, 63, 0.08);
}
/*Dropdown chosen option*/
#surveyContainer .sv-list__item.sv-list__item--selected .sv-list__item-body {
    background-color: rgba(23, 134, 231, 0.754);
    color: rgb(251, 253, 255);
}
/*Dropdown option hover*/
#surveyContainer .sv-list__item .sv-list__item-body:hover {
    background-color: rgba(144, 200, 248, 0.267);
}
/*Dropdown List Body*/
#surveyContainer .sv-popup__content, 
#surveyContainer .sv-popup--dropdown .sv-popup__body-content{
    background-color:rgba(206, 206, 206, 0.71);
} 
#surveyContainer  .sv-dropdown-popup .sd-list__item-body{
    background-color:rgba(232, 231, 231, 0.86);
}

#surveyContainer input, #surveyContainer textarea, #surveyContainer .sd-dropdown__value {
    color: rgb(61, 61, 61);
    font-family:'Arial, Helvetica', sans-serif;
    font-size: 1.2em;
}


/*
Check-box
*/
#surveyContainer .sd-item.sd-selectbase__item.sd-checkbox{
    background-color: rgba(157, 157, 157, 0.05) ;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-evenly;
}
.newsmatic_dark_mode #surveyContainer .sd-item.sd-selectbase__item.sd-checkbox{
    background-color: rgba(157, 157, 157, 0.05) ;
}
.newsmatic_dark_mode #surveyContainer .sd-item__control-label{
    color: rgb(97, 176, 255);
}

#surveyContainer .sd-item__decorator
{
    background-color: rgba(137, 137, 137, 0.197) ;
    box-shadow: 0 0 0 2px #5c5c5c;
}
.newsmatic_dark_mode #surveyContainer .sd-item__decorator
{
    background-color: rgba(127, 207, 241, 0.05);
    box-shadow: 0 0 0 2px rgb(97, 176, 255);
}
#surveyContainer .sd-item__control:focus+.sd-item__decorator{
    box-shadow: 0 0 0 2px var(--sjs-primary-backcolor);
}


/*Placeholders*/
#surveyContainer input::placeholder, #surveyContainer textarea::placeholder{
    color: rgb(14, 24, 31);
    opacity: 0.6;
}
/*Night*/
.newsmatic_dark_mode #surveyContainer .sd-multipletext__item-title{
    color: rgb(202, 202, 202);
    opacity: 0.7;
}

.newsmatic_dark_mode #surveyContainer input, .newsmatic_dark_mode #surveyContainer textarea, 
.newsmatic_dark_mode #surveyContainer .sd-dropdown__value  {
    color: rgb(220, 220, 220);
}
/*Required color*/
.newsmatic_dark_mode #surveyContainer .sd-question__required-text{
    color: #146fd0;
}
/*DropDown Selection Global Background Color*/
.newsmatic_dark_mode .sv-list__container{
    background-color: rgba(163, 163, 163, 0.05);
}
/*Dropdown chosen option*/
.newsmatic_dark_mode #surveyContainer .sv-list__item.sv-list__item--selected .sv-list__item-body {
    background-color: rgba(23, 134, 231, 0.754);
    color: rgb(251, 253, 255);
}
/*Dropdown option hover*/
.newsmatic_dark_mode #surveyContainer .sv-list__item .sv-list__item-body:hover {
    background-color: rgba(39, 102, 169, 0.453);
}
/*Dropdown List Body*/
.newsmatic_dark_mode #surveyContainer .sv-popup__content, 
.newsmatic_dark_mode #surveyContainer .sv-popup--dropdown .sv-popup__body-content{
    background-color:rgb(57, 57, 57);
} 
.newsmatic_dark_mode #surveyContainer  .sv-dropdown-popup .sd-list__item-body{
    background-color:rgb(90, 90, 90);
    color: rgb(226, 226, 226);
}

/*Placeholders*/
.newsmatic_dark_mode #surveyContainer input::placeholder, 
.newsmatic_dark_mode #surveyContainer textarea::placeholder,
.newsmatic_dark_mode #surveyContainer .sd-multipletext__item input::placeholder{
    color: rgb(97, 181, 255);
    opacity: 0.7;
}
.newsmatic_dark_mode #surveyContainer .sd-remaining-character-counter{
    color: rgb(30, 120, 223);
    opacity: 0.7;
}



/*
***Action Button
*/
/*Center Button bar*/
#surveyContainer .sd-action-bar{
    justify-content: center !important;
    /*Make the proper padding*/
    flex-direction: column;
    padding-left: calc(var(--sd-base-padding) + var(--sv-element-add-padding-left, 0px)); 
    padding-right: calc(var(--sd-base-padding) + var(--sv-element-add-padding-right, 0px));  
}
/*Button style*/
#surveyContainer .sv-action__content input[type="button"], /*Form Action Button*/
#surveyContainer .sd-btn a,               /* Custom Social Buttons*/     
#surveyContainer .sd-btn button /* Custom Button */
{
    background-color: var(--sjs-primary-backcolor);
    flex-grow: 1;
    border: none;
    color: white !important;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    
}
#surveyContainer .sv-action__content input[type="button"]:hover {
    background-color: var(--sjs-primary-backcolor-hover);
}
/*Fix Action Button in Mobile*/
#surveyContainer .sd-root-modern--mobile .sd-body__navigation .sd-btn{
    min-width: fit-content;
    max-width: 450px;
    width: 66%;
}

/*Section to fix extra buttons to SurveyJS forms*/
#surveyContainer .spacer{
   height: 40px;
   min-height: 40px;
   width: 100%; 
}
#surveyContainer .sv-custom-footer{
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: normal;
    /*padding-left: calc(var(--sd-base-padding) + var(--sv-element-add-padding-left, 0px)); 
    padding-right: calc(var(--sd-base-padding) + var(--sv-element-add-padding-right, 0px)); */ 
}

#surveyContainer .sd-btn{
    background: none;
    width: 100%;
    box-shadow: none;
}

#surveyContainer .sd-btn a,
#surveyContainer .sd-btn button  {
    display: block;
    min-width: fit-content;
    max-width: 350px;
    width: 80%;
    margin: auto;
    /*white-space: pre-line;
    word-wrap: break-word;*/ 
    
}
/*Boton de Facebook*/
#surveyContainer .sd-btn.facebook-btn a {
    background-color :#1877f2;
    font-size: 0.9em;
}
/*Boton de Google*/
#surveyContainer .sd-btn.google-btn a {
    background-color :#DB4437;
    font-size: 0.9em;
}
#surveyContainer .sd-btn span.socialOpt {
    display: none;
}
/*Regresa al estilo original para pantallas de mas de 50 pixeles */
@media screen and (min-width: 500px) {

    #surveyContainer .sd-btn a,
    #surveyContainer .sd-btn button  {
        display: block;
        min-width: 320px;
        max-width: 450px;
        width: 60%;
        white-space: nowrap;  /*evita salto de linea */ 
    }
    /*Boton de Facebook*/
    #surveyContainer .sd-btn.facebook-btn a {
        background-color :#1877f2;
        font-size: 1.1em;
    }
    /*Boton de Google*/
    #surveyContainer .sd-btn.google-btn a {
        background-color :#DB4437;
        font-size: 1.1em;
    }   
    #surveyContainer .sd-btn span.socialOpt {
        display: inline-block;
    }
}

#surveyContainer .social i{
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
    margin-right: 0;
    margin-left: 2px;
    font-size: 1.2em;
}




/*********************
  reCAPTCHA style
**********************/
#surveyContainer .custom-grecaptcha-badge-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

#surveyContainer .custom-grecaptcha-badge {
    font-size: 14px;
    /*color: #323232;*/
    display: block;
    /*background-color: rgba(100, 148, 237, 0.06);
    min-width: 200px;
    max-width: 350px;
    padding: 30px 80px;*/
}

#surveyContainer .custom-grecaptcha-links{
    display: flex;
    justify-items: center;
    justify-content: space-evenly;
}



/******************************
* Estilos para el modal 
******************************/

#surveyModal.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1001; /* Asegura que esté en frente */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fondo oscuro semitransparente */
    justify-content: center;
    align-items: center;
  }
  
  /* Contenido del modal */
  .modal-container {
    position: relative;
    background-color: white;
    border-radius: 10px;
    min-width: 250px;
    min-height: 300px;
    max-width: 80%;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
  }

  .newsmatic_dark_mode .modal-container {
    background-color: rgb(45, 45, 45);
    box-shadow: 0px 0px 10px rgba(208, 208, 208, 0.3);
    color: white;
  }

  /* Contenido del modal */
  .modal-content {
    margin-top: 5px;
    padding: 10px 30px 40px 30px;  /*top, right, botom, left*/
    text-align: center;
  }

  .modal-header{
    background-color: #117702;
    color: white;
  }
  
  .modal-header.modal-error{
    background-color: #b91919;
    color: white;
  }

  /* Contenedor del botón de cierre */
  .close-container {
    position: absolute;
    top: -18px;
    right: -18px;
  }

  /* Botón de cierre */
  .close {
    padding: 8px;
    width: 40px;
    height: 40px;
    background-color: #b91919;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
    transition: 0.3s ease-in-out;
  }

  .close:hover {
    background-color: #8c0a0a;
  }

  /*Botones de OK y Cancelar*/  
  .modal-buttons {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  
  .modal-buttons button {
    padding: 8px 16px;
    border: none;
    background-color: #117702;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
  }

  .modal-buttons button.modal-error{
    background-color: #b91919;
  }


  .modal-buttons button:hover {
    background-color: #106b01;
  }

  .modal-buttons button.modal-error:hover {
    background-color: #8c0a0a;
  }

  @media (min-width: 769px) {
    .modal-container {
        min-width: 400px;
        max-width: 600px;
    }
  }
  