@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Yantramanav:wght@100;300;400;500;700;900&display=swap');

:root{
    /*En este bloque puedes agregar propiedades especificas que van a afectar a toda la web, color, tamaño, margen, padding, etc.*/
    --blue: #4f99ed;
    --blue-os: #062c8b;
    --white:#fff;
    --exchange-rate-color:#555;
    --exchange-rate-color-2:#e9e9e9;
    --input-background:rgba(119,136,153,0.15);
    --input-shadow:rgba(119,136,153,0.35);
    --input-border:#ddd;
    --shadow-1:rgba(0,0,0,0.25);
    --shadow-2:rgba(0,0,0,0.15);
    --loading-bg-1:#c2cfd6;
    --loading-bg-2:#f0f3f5;
}   

/**{*/
/*    padding: 0;*/
/*    margin: 0;*/
/*    box-sizing: border-box;*/
/*    font-family: "Outfit", sans-serif;*/
/*}*/

/*body{*/
    /* height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(to bottom, #b8307b, #4a3f6d);
    overflow: hidden; */

    /*Esto hace algo parecido pero con grid y llamando a las variables declaradas en Root líneas más arriba*/

/*    display: grid;*/
/*    place-items: center;*/
/*    height: 100vh;*/
/*    background: linear-gradient(135deg, var(--blue), var(--blue-os));*/
/*}*/

main{
    background: var(--white);
    padding: 10px 30px 28px 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    display: grid;
    gap: 20px;
    box-shadow: 0 0 5px var(--shadow-1), 0 5px 10px var(--shadow-2);
    position: relative;
    overflow: hidden;
}

main h1{
    text-align: center;
    /*text-transform: uppercase;*/
    font-size: 1.2rem;
    color: #00266e !important;
    padding: 20px 20px 12px 20px;
}

button{
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.controls{
    display: grid;
    gap: 20px;
    position: relative;
}

.control{
    display: flex;
    background: var(--exchange-rate-color-2);
    box-shadow: inset 0 0 3px var(--input-shadow);
    border-radius: 10px;
    overflow: hidden;
}

.control button.mon-usd {
    /* --image: url(https://placehold.co/30/0e309d/white?text=$); */
    --image: url("img/usa.png");
    font-weight: 600;
    background: transparent;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control button.mon-usd::before{
    content: "";
    width: 40px;
    height: 30px;
    background: var(--image) right no-repeat;
    background-size: contain;
    /* border-radius: 50%; */
    /* background: #0e309d var(--image) center no-repeat; */
}

.control button.mon-pen{
    /* --image: url(https://placehold.co/30/0e309d/white?text=S/); */
    --image: url("img/per.png");
    font-weight: 600;
    background: transparent;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    
}

.control button.mon-pen::before{
    content: "";
    width: 40px;
    height: 30px;
    background: var(--image) right no-repeat;
    background-size: contain;
    /* border-radius: 50%; */
    /* background: #0e2f9d00 var(--image) center no-repeat; */
}

/* .control button::after{
    font-family: "Material Symbols Outlined";
    font-size: 1.5rem;
    content: "\e5c5"; 
} */

.control input {
    font-size: 1.4rem;
    font-weight: 600;
    text-align: end;
    background: transparent;
    width: 100%;
    border: none;
    outline: none;
    padding: 20px 20px 10px 20px;
    color: #01325a;
}

.control input::-webkit-inner-spin-button,
.control input::-webkit-outer-spin-button{
    appearance: none;
}

.control .mon-mensaje {
    font-size: 15px;
    font-weight: 500;
    position: absolute;
    inset-inline-start: 85%;
    transform: translate(-45%, 20%);
    transition: 0.3s;
    width: 50px;
    text-align: right;
    color: #555;
}


.swap-btn{ 
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background:var(--blue-os);
    color: var(--white);
    line-height: 1;
    /* box-shadow: 0 3px 5px var(--shadow-1); */
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    transition: 0.3s;
}

.swap-btn:hover{
    background: var(--blue);
}

.swap-btn span{
    rotate: 90deg;
    transition: inherit; 
    display: block;
}

/* .swap-btn:hover span{
    rotate: 270deg;
} */
 
/* para rotar el boton con JS */
.swap-btn.rotated {
    transform: translate(-50%, -50%) rotate(180deg);
  }

/* .exchange-rate{
    text-align: center;
}

.exchange-rate h5{
    text-transform: uppercase;
    color: var(--blue-os);
}

.exchange-rate span{
    margin-top: 10px;
    display: inline-block;
    color: var(--exchange-rate-color);
    font-weight: 500;
} */
.exchange-rate{
    background: var(--exchange-rate-color-2);
    /* display: grid;
    gap: 10px; */
    padding: 5px;
    border-radius: 10px;
}

.exchange-rate-switch{
    /*display: flex;*/
    /*justify-content: space-evenly;*/
    /*border-radius: 10px;*/
    display: flex;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    padding: 8px 3px 8px 3px;
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 10px;
    
}

.exchange-rate-usd{
     display: grid;
    /* gap: 10px; */
    align-items: center;
    text-align: center;
    color: var(--blue-os);
    font-weight: 600;
    width: 48%;
    border-radius: 10px;
    padding: 15px 5px 15px 5px;
    border: 1px solid #344a648f;
    font-family: 'Montserrat';
}

.exchange-rate-usd.active{
    display: grid;
    /* gap: 10px; */
    align-items: center;
    text-align: center;
    background-color: #001a62;
    color: var(--white);
    font-weight: 600;
    width: 48%;
    border-radius: 10px;
    padding: 15px 5px 15px 5px;
    font-family: 'Montserrat';
    margin-right: 1px;
}

.exchange-rate-pen{
    display: grid;
    /* gap: 10px; */
    align-items: center;
    text-align: center;
    color: var(--blue-os);
    font-weight: 600;
    width: 48%;
    border-radius: 10px;
    padding: 15px 5px 15px 5px;
    border: 1px solid #344a648f;
    font-family: 'Montserrat';
}

.exchange-rate-pen.active{
      display: grid;
    /* gap: 10px; */
    align-items: center;
    text-align: center;
    background-color: #001a62;
    color: var(--white);
    font-weight: 600;
    width: 48%;
    border-radius: 10px;
    padding: 15px 5px 15px 5px;
    font-family: 'Montserrat';
    margin-left: 1px;
}

.medida-mon span{
    font-size: 16px;
    font-weight: 600;
}

.simbolo-mon{
    font-size: 1.2rem;
    color: #01325a;
}


/*Cambios en Wordpress*/


div#calculator {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    width: 100% !important;
    box-sizing: border-box!important; /* Esto asegura que padding y borde se incluyan en el ancho total */
}


/* Responsive mobile*/

@media only screen and (max-width: 745px) {
    div .medida-mon {
        font-size: 14px;
        font-weight: 500;
    }
}

@media only screen and (max-width: 745px) {
    .control button.mon-pen, .control button.mon-usd{
        margin-left: 5px;
    }
}


@media only screen and (max-width: 745px) {  
    input#usd-input, input#pen-input {
        padding: 20px 10px;
    }
}

@media only screen and (max-width: 745px) {  
    input.responsive-calculator {
        font-size: 25px;
    }
}

@media only screen and (max-width: 745px) {  
    .control .mon-mensaje {
        transform: translate(-70%, 20%);
        transition: 0.3s;
        text-align: right;
        padding-right: 10px;
    }
}

@media only screen and (max-width: 745px) {  
   main{
    padding: 20px 10px 20px 10px;
   }
}

@media only screen and (max-width: 745px) {  
   h1{
    text-align: center;
    /*text-transform: uppercase;*/
    font-size: 1.2rem;
    color: var(--blue-os)!important;
}
}

@media only screen and (max-width: 745px) {  
.exchange-rate-switch {
    margin-left: 0px;
    margin-right: 0px;
}
}





/* #control-usd, #control-pen, .mon-usd, .mon-pen {
    transition: top 0.3s ease, transform 0.3s ease;
} */