:root {
    --my-fav-color: deeppink;
}

* {
    box-sizing: border-box;
}

*:focus {
    outline: none;
    /* box-shadow: inset 0 0 0 1px #ccc; */
    box-shadow: inset 0 0 0 5px red;
}
/* input:focus + label { */
/*    box-shadow: none; */
/* } */

body {
    padding: 30px 20px;
    background: #fff;
    color: #333;
    font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
}

main {
    max-width: 1024px;
    margin: auto;
}

h1 {
    text-align: center;
    margin-top: 0;
}

h2 {
    margin: 0 0 12px;
    font-size: 30px;
}

p {
    margin: 0 0 20px;
    font-size: 20px;
    line-height: 1.5;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto 20px;
    /* border-radius: 10px 10px 0 0; */
}

.radiotab {
    position: absolute;
    top: -100px;
    /* opacity: 0; */
}

.label {
    display: flex;
    justify-content: center;
    align-items: center;    
    height: 4rem;
    width: 100%;
    padding: 0;
    background: #e5e5e5;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    color: #7f7f7f;
    transition: background .3s, color .3s;
    border: 1px solid #999;
    /* border-radius: 0; */
    text-align: center;
    vertical-align: middle;
}

.label:hover {
    background: #d8d8d8;
}

.label:active {
    background: #ccc;  
}

.radiotab:checked + .label {
    background: #fff;
    color: #000;
    border-top: solid 2px #666;
    border-left: solid 2px #666;
    border-right: solid 2px #666;
    border-bottom: none;
    background-repeat: no-repeat;
    background-size: 2.5rem;
    background-position-y: center;
    background-color: transparent;
}

.radiotab:checked + .label:first-of-type {
    border-radius: 10px 10px 0 0;
}
/* .radiotab::not(:checked) {
   } */

.label:first-of-type {
    border-radius: 10px 10px 0 0;
}

.label:last-of-type {
    border-radius: 0 0 10px 10px;
}
.radiotab:checked + .label:last-of-type {
    border-radius: 0;
}
/* .radiotab:checked + .label {
   background-color: --my-fav-color;
   } */

/* .radiotab:checked + .label#labelone { */
/*     background-image: url("linux.png"); */
/*     background-position: center right 3px; */
/* } */
/* .radiotab:checked + .label#labeltwo { */
/*     background-image: url("mac.png"); */
/*     background-position: center right 3px; */
/* } */
/* .radiotab:checked + .label#labelthree { */
/*     background-image: url("bsd.png"); */
/*     background-position: center right 5px; */
/* } */
/* .radiotab:checked + .label#labelfour { */
/*     background-image: url("win.png"); */
/*     background-position: center right 5px; */
/* } */

.text {
    width: 100%;
    /* border: solid green 1px; */
    margin: 0 auto;
    padding-left: 2.6rem;
}
.text:focus {
    color: red;
}

.icon {
    display: inline-block;
    height: 100%;
    line-height: 90px;
    width: 64px;
    /* border: solid red 1px; */
    margin-right: 0.4rem;
    margin-left: auto;
    vertical-align: middle;    
}
.icon img {
    height: 36px;    
    opacity: 0;
    transition: opacity .8s;   
}
.radiotab:checked + .label .icon img {
    opacity: 1.0;
    transition: opacity 1.2s;   
}

.panel {
    display: none;
    padding: 0.9rem 0.9rem 0.9rem;
    background: #fff;
    border: 1px solid #666;
    /* border-radius: 10px; */
    width: 100%;
    border-left: solid 2px #666;
    border-bottom: solid 2px #666;
    border-right: solid 2px #666;
}

.label:last-child {
    border-radius: 0 0 10px 10px;
}
/* .radiotab:checked + .label:first-child { */
/*     border: solid 1px red; */
/*     /\* border-radius: 0 0 10px 10px; *\/ */
/* } */
.radiotab:checked + .label + .panel:last-child {
    border-radius: 0 0 10px 10px;
}

/* .panel:first-child { */
/*   border-radius: 10px 10px 10px 10px; */
/* } */
/* .panel:last-child { */
/*   border-radius: 0 0 10px 10px; */
/* } */

/* Tooltip */

/* https://css-generators.com/tooltip-speech-bubble/ */

/* HTML: <div class="tooltip">This is a Speech Bubble with a solid coloration and with border radius </div> */
.tooltip {
    display: inline-block;
    position: relative;
    color: #fff;
    font-size: 0.8em;
    max-width: 66ch;
    text-align: center;
    /* triangle dimension */
    --b: 1em; /* control the base */
    --h: 1.1em; /* control the height */
    padding: 0.8em;
    border-radius: 1.2em;
    border-bottom-right-radius: 0;
    clip-path: polygon(100% 0,0 0,0 100%,
    calc(100% - var(--b)) 100%,
    calc(100% + var(--h)) calc(100% + var(--h)),
    100% calc(100% - var(--b)));
    background: var(--my-fav-color);
    border-image: conic-gradient(var(--my-fav-color) 0 0) 0 999 999 0/
    0 calc(var(--h) + var(--b)) calc(var(--h) + var(--b)) 0/0 var(--h) var(--h) 0;
}
.tooltipbox {
    position: fixed;
    margin-left: -17.7rem;
    margin-top: -4.7rem;
    z-index: 1;
    opacity:0;
    visibility: hidden;
    transition:1.0s;
}

.codebtn {
    display: flex;
    background-color: #eee;
    border: 1px solid #666;
    border-radius: 10px;
    width: 100%;
}


.panel code {
    margin-top: 10px;
    color: deeppink;
    padding: 20px;
    font-size: 0.8rem;
    width: calc(100% - 4rem);
}
.panel button {
    display: none;
    /* box-shadow: none; */
}
.panel button:hover {
    background-color: #aaa;
    /* border: 1px solid deeppink; */
    /* box-shadow: inset 0 0 0 1px deeppink; */
}
.panel button:active, .simulate-button-active {
    /* box-shadow: 2px 2px 5px 5px deeppink; */
    box-shadow: 0 0 5px 2px rgb(255 20 147 / 75%);
}

.radiotab:checked + .label + .panel {
    display: flex;
}

@media (min-width: 600px) {
    .panel {
        order: 99;
        border-radius: 0 0 10px 10px;
        /* border-radius: 10px; */
    }
    
    .label {
        width: 25%;
        border-radius: 10px 10px 0 0;
        border-bottom: solid 2px #666;
        font-size: 1rem;
    }
    .label:last-of-type {
        border-radius: 10px 10px 0 0;
    }
    .text {
        padding-left: 2rem;
    }
    .panel button {
        display: block;
        margin: 0.35rem 0.8rem 0.35rem 0.8rem;
        padding: 0.1rem 0.1rem 0.1rem 0.1rem;
        width: 3.8rem;
        border: 1px solid #aaa;
        border-radius: 10px;
        background-color: #ccc;
        background-image: url("copy.svg");
        background-size: 3rem 3rem;
        background-repeat: no-repeat;
        background-position: center right 5px;
        cursor: pointer;
    }
    .panel code {
        font-size: 1rem;
    }
    .radiotab:checked + .label:last-of-type {
        border-radius: 10px 10px 0 0;
    }

    /* For Desktop, show the keyboard usage tooltip text on focus/onLoad */
    /* Use 'subsequent-sibling' (~) here, as 'next-sibling' does not match. */
    .radiotab:focus ~ .tooltipbox .tooltip {
        background: --my-fav-color;
        border-image: conic-gradient(var(--my-fav-color) 0 0) 0 999 999 0/
        0 calc(var(--h) + var(--b)) calc(var(--h) + var(--b)) 0/0 var(--h) var(--h) 0;
    }
    .radiotab:focus ~ .tooltipbox {
        opacity:0.67;
        transition:2.0s;
    }
    .showme {
        visibility: visible;
    }
    /* Show BR tag for narrow screens... */
    br.responsive {
        display: inline;
    }
    /* ...or whatever you are after */
    @media (min-width: 680px) {
        br.responsive {
        display: none; // Hide BR tag for wider screens
      }
    }    
}
