/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: url('https://media0.giphy.com/media/v1.Y2lkPTZjMDliOTUyb3J1Ync1bW9idjhrMXZnOXNtODcwOWFzMWFmNzM2Mmx6cTl6dGtlayZlcD12MV9naWZzX3NlYXJjaCZjdD1n/FlodpfQUBSp20/source.gif');
    font-family: system-ui, sans serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #101010;
    background-color:#edf4ff;
    border-block-start: 10px solid #636b2f;
    padding: 3rem 1rem;
}

h1 {
    font-size; 1.5rem;
    font-weight: 600;
    text-align: center;
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-block-end: 0.5em;
}

p:not(:last-child) {
    margin-block-end: lem;
}

.widget {
    width: 80vw;
    max-width: 600px;
    padding: 1rem;
    margin: 2rem auto;
    border-radius: 1rem;
    background-color: #fff;
    box-shadow: 0 10px 20px 0 rgba(0, 0, 0.025);
}

.tabs {
    --tab-count: 3;
    --active: 0;

    position: relative;
    isolation: isolate;
    display: flex;
    height: 3.5rem;
    border-block-end: 1px solid #e9ebec;
}

.tabs input {
    display: none;
}

.tabs label {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #656d7b;
    cursor: pointer;
    transition: color 0.5s ease-in-out;
}

.tabs input:checked + label {
    color: #101010;
}

.tabs ::after {
    pointer-events: none;
    position: absolute;
    content: "";
    z-index: -1;
    inset: 0 0 -1px;
    width: calc((100% /3) - 2px);
    border-radius: 0.5rem 0.5rem 0 0;
    border: 1px solid #e9ebec;
    border-block-end: none;
    background-image: linear-gradient(#edf4ff, #fff);
    
    
    translate: calc(var(--active) * 100%);
    transition: translate 0.5s ease-in-out;
}

.tabs:has(:checked:nth-of-type(1)) {
    --active: 0;
}

.tabs:has(:checked:nth-of-type(2)) {
    --active: 1;
}

.tabs:has(:checked:nth-of-type(3)) {
    --active: 2;
}

.tab-content {
    padding: 1rem;
}

[class^="tab-content-"] {
    display: none;
}

.widget:has(:checked:nth-of-type(1)) .tab-content-1,
.widget:has(:checked:nth-of-type(2)) .tab-content-2,
.widget:has(:checked:nth-of-type(3)) .tab-content-3 {
    display: block;
}