* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    /*font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;*/
    font-family: 'Poppins', sans-serif;
}

:root {
  --main: #F5A623; 
  --sdo: #2C3E50;
  --third: #FAF3E0;


}

body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px;
    /*background-color: #f1f1f1;*/
    background-color: #3498db;
    padding: 20px;
}

a {
    text-decoration: none;
}

li {
    list-style-type: none;
}

.hide {
    display: none;
}

button {
    cursor: pointer;
}

.form {
    padding: 10px;
    grid-column: 1 / 3; /* ocupa ambas columnas */
}

.form input {
    font-size: 1.5em ;
    padding: 3px;
}

.form button {
    margin: 5px; display: inline-block; padding: 5px;
}

.form select {
    display: block;
    margin: 10px 0;
    padding: 10px;
}

.trx {
    padding: 10px;
    grid-column: 1 / 3; /* ocupa ambas columnas */
    height: 100px;
    border-radius: 5px;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    background-color: var(--sdo) !important;
    overflow: auto;
}


.trx p {
    margin: 10px;
    font-weight: bold;
    color: #fff;
}


.steps {
    max-width: 100%;
    background: #f5f5f5;
    
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    padding: 10px 20px;
}


.steps  div.customer_info {
    padding: 15px 0;
    border-bottom: 2px solid #f1f1f1;
    display: grid;
    background-color: #fff;
    grid-template-columns: auto minmax(0, 50px) ;
}

.steps  div.customer_info:hover {
    background: #f1f1f1;
}

.steps  div.customer_info  p  {
    padding: 10px;
    font-size: 1.5em;
    color: var(--sdo);
}

.steps  div.customer_info  p:first-child {
    text-align: right;
    overflow: auto;
}

.steps  div.customer_info  span {
    color: #333;
    cursor: pointer;
    padding: 10px;
}

.steps  div.customer_info  span {
    background-color: var(--sdo);
    font-size: 2em;
    color: var(--main);
    display: flex;
    justify-content: center;
    align-items: center;
}
.steps  div.customer_info span:hover{
    color: var(--third);
}

.steps  div.customer_info:hover {
   box-shadow: 1px 1px 1px #f1f1f1;
}

.steps  div.customer_info span:hover {
    color: var(--third);

}


.steps input {
    display: block;
    width: 100% !important; 
    margin: 10px auto;
    padding: 10px;
    font-size: 1.1em;
}

.steps button {
    width: 50%;
    display: block;
    margin: 15px auto;
    padding: 10px;
    border:none;
    background-color: var(--sdo);
    color: var(--third);
    text-align: center;
    border-radius: 3px;
    box-shadow: 1px 1px 1px #333;
}


.steps .message {
    max-width: 75%;
    padding: 10px;
    margin: 15px 0;
    border-radius: 10px;
    font-size: 1.5em;
    position: relative;
    line-height: 1.5;
}

.steps .customer, .steps .dispatcher {
    background: var(--main);
    align-self: flex-start;
    color: #fff;
    
}

.steps .agent, .steps .broker, .steps .driver, .steps .insurance_rep, .steps .warehouse_manager, .steps .repair_shop_rep {
    background: var(--sdo);
    align-self: flex-end;
    margin-left: auto;
    color: var(--third);
}



/* Esquina puntiaguda del agente (izquierda) */
.agent::after,.broker::after,.driver::after, .insurance_rep::after , .warehouse_manager::after, .repair_shop_rep::after {
    content: "";
    position: absolute;
    top: 10px; /* Cambia de bottom a top */
    right: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 0;
    border-color: var(--sdo) transparent transparent transparent;
   
}

/* Esquina puntiaguda del cliente (derecha) */
.customer::after, .dispatcher::after {
    content: "";
    position: absolute;
    top: 10px; /* Cambia de bottom a top */
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 0 10px;
    border-color: var(--main) transparent transparent transparent;
}


p.customer, p.dispatcher {
    background-color: #2C3E50 !important;
}

p.agent, p.broker, p.driver, p.insurance_rep, p.warehouse_manager, p.repair_shop_rep{
    background-color: #F5A623 !important;
}





.steps .message .who {
    display: flex;
    justify-content: space-between;
    padding: 2px;
    margin: 10px 0;
    
}

.steps .message .who span:first-child {
    display: inline-block;
    padding: 3px 5px; 
    border-radius: 3px;
    cursor: pointer;
}

.steps .message .who span:last-child {
    display: inline-block;
    margin: auto 5px;
}

.steps .message .who:hover {
    cursor: pointer;  
}

.steps .message .sms {
    padding: 8px;
}


.contraction {
    width: 100%;
    margin: 13px auto;
    background-color: var(--sdo);
    padding: 20px;
    color: var(--third);
    border-radius: 2px;
}

.contraction p:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--main);
}

.contraction .exa {
    margin: 5px 0;
    font-size: 0.9em;
}

.contraction p:last-child {
    text-align: right;
    color: var(--main);
}


.glossary  {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 10px 20px;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.glossary  p.pasos {
    display: flex;
    flex-direction: column;
    margin: 7px 0 !important;
    padding: 5px !important;
    font-size: 0.9em;
}

.glossary p.pasos span {
    color: var(--third);
    background-color: var(--sdo);
    padding: 3px 0;
    display: block;
   
}

.glossary  hr {
    border: none; /* Elimina el borde predeterminado */
    height: 1px; /* Ajusta el grosor */
    background-color: teal; /* Color sólido */
    margin: 20px 0; /* Espaciado arriba y abajo */
}

.glossary  p:not(.term) {
    padding: 10px 0; /* Cambia el color del texto a azul */
}
.glossary  .term {
    margin: 10px; color: var(--sdo);
    font-weight: bold;
}



footer {
    background-color: #fff;
    border-radius: 10px;
}

fieldset  {
    padding: 20px;
    border: none;
}


legend {
    background-color: var(--sdo);
    color: #f1f1f1;
    padding: 5px 20px;
    margin: 0 auto;
    border: none;
}

.glossary .roleplays {
    display: block;
    width: 100%;
    margin: 10px;
    padding: 5px;
    
}
/* SPelling test **/


    main {
        background-color: #fff;
        border-radius: 5px;
        padding: 15px 10px;
    }

    main select {
        padding: 10px;
        display: block;
        margin: 5px auto;
    }

    main form {
        width: 100%; 
    }

    main form input[type="radio"] {
        padding: 10px;
        margin: 10px;
    }

    main form br {
        margin: 10px;
    }

    main section.control {
        width: 100%;
    }
    main section.control textarea {
        width: 100%;
        height: 100px;
        font-size: 1.6em;
        display: block;
        margin-bottom: 15px;
    }

    main section.control button {
        display: inline-block;
        margin: 10px;
        padding: 10px 15px;
        background-color: var(--sdo);
        color: var(--third);
        border: none;
    }

    main section.control button span {
        padding-right: 5px;
    }

    main section.control button:hover {
        background-color: var(--main);
    }

    main section.hiden {
        display: none;
        background-color: #fff;
        padding: 10px 0;
        height: auto;
    }

    main h2 {
        color: var(--sdo);
        padding: 5px 0;
    }

    main section.prices {
        flex-flow: row wrap;
        justify-content: space-between;
    }

    main section.prices select {
        width: 100%; display: block;

    }

    main section.prices input {
        padding: 10px; font-size: 1.1em;
        width: 40%;
    }

    #game-board {
        display: grid;
        grid-template-columns: repeat(4, 130px);
        gap: 15px;
        justify-content: center;
        margin-top: 30px;
    }

    .card {
        width: 130px;
        height: 130px;
        background: #3498db;
        color: white;
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 8px;
        user-select: none;
    }

    .card.flipped {
        background: #2ecc71;
    }


    .hidden {
        visibility: hidden;
    }


    /*/////////////////////////////*/
    .autocomplete { position: relative; max-width: 100%; margin: auto; }
    input[type="text"] {
      width: 100%;
      padding: 12px;
      font-size: 1rem;
      box-sizing: border-box;
    }
    #sugerencias{
        display:none;
    }

    #audio {
        display:none;
    }
    ul.sugerencias {
      position: absolute; top: 100%; left: 0; right: 0;
      background: #fff; border: 1px solid #ccc;
      list-style: none; margin: 2px 0 0; padding: 0;
      max-height: 200px; overflow-y: auto;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1); z-index: 10;
    }
    ul.sugerencias li {
      padding: 10px; cursor: pointer;
    }
    ul.sugerencias li:hover {
      background-color: #f0f0f0;
    }

    /* links del menu*/
    a.links {
        color: #FAF3E0;
        padding: 5px;
        border-radius: 5px;
        display: inline-block !important;
    }

    a.links:hover {
        background-color:rgb(51, 71, 90);
    }

    /* Medical vocabulary */
    .option-btn { display: block; margin: 5px 0; padding: 8px; background-color: #eee; border: 1px solid #ccc; cursor: pointer; }
    .correct { background-color: #c8f7c5; }
    .incorrect { background-color: #f7c5c5; }
    .voca {
        width: 100%;
    }

    .voca p {
        width: 100%;
        display: flex;
        justify-content: space-between;
        flex-flow: row wrap;
        border: 1px solid gray;
        padding: 12px;
    }

    .vaca p span{
        display: block !important;
        width: 50%;
        font-size: 0.9em;
    }

    .vaca p span.en{
        text-align: left !important;
    }

    .vaca p span.es {
        text-align: right !important;
        
    }


 #customMenu {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
  }
  #customMenu button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 5px;
    text-align: left;
    cursor: pointer;
  }


  /*    PATTERNS */
  .patterns h3 {
    margin: 15px 0;
  }

  .patterns p {
    padding: 8px 0;
    color: var(--sdo);
    font-weight: 600;
  }
  @media only screen and (max-width: 600px) {
    body {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .steps {
        padding: 10px 1px;
    }

    body > section {
        width: 100%;
    }

    .steps  div.customer_info  p:first-child  {
        padding: 5px 1px;
        font-size: 1.2em;
        text-align: left;
    }
    
    .steps .message {
        max-width: 80%;
        font-size: 1.3em;
        line-height: 1.3;
    }

    #game-board {
        display: grid;
        grid-template-columns: repeat(4, 70px);
        gap: 8px;
        justify-content: center;
        margin-top: 30px;
    }

    .card {
        width:70px;
        height: 70px;
        background: #3498db;
        color: white;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        border-radius: 8px;
        user-select: none;
    }


}