/* ------------
Colours and fonts
Note: all colours only work on black...
------------ */
:root{
    --lightblue: #94CEFE;
    --darkblue:#66B3F2;
    --mutedblue: #66b3f246; /*transparent version of darkblue*/
    --accent: #D29524; /*former: aqua*/
    --lightAccent: #D2952499;
    --background: #011C25;
    --inputBack: rgba(148, 206, 254, 0.125);
  }

/*TODO Change Fontface to Megaperls*/
/*
@font-face {
    font-family: 'circulos';
    src:  url('fonts/GranCirculos-Regular.woff2') format('woff2'),
          url('fonts/GranCirculos-Regular.woff') format('woff');
}*/

@font-face {
    font-family: 'megaperls';
    src:  url('fonts/AD-MegaPearlsVF.woff') format('woff2'),
          url('fonts/AD-MegaPearlsVF.woff2') format('woff');
}

/*
@font-face {
  font-family: 'megaEdge';
  src: url('/fonts/structural/AD-MegaPearlsVF-Webfont.woff2') format('woff2'),
      url('/fonts/structural/AD-MegaPearlsVF-Webfont.woff') format('woff');    
  font-feature-settings: "smcp" on;
  font-variation-settings:
    "ROND" 0;
}

@font-face {
  font-family: 'adoup';
  src: url('/fonts/structural/AD-Oup-ExtraBold.woff2') format('woff2'),
       url('/fonts/structural/AD-Oup-ExtraBold.woff') format('woff');
  font-weight: bold;
  font-style: normal;

}

@font-face {
  font-family: 'MPBody';
  src: url('/fonts/structural/AD-MegaPearlsVF-Webfont.woff2') format('woff2'),
      url('/fonts/structural/AD-MegaPearlsVF-Webfont.woff') format('woff');      
  size-adjust: 104%;
  font-variation-settings:
      "ROND" 0;
}
*/

/* enter utopia
/* @link https://utopia.fyi/type/calculator?c=320,16,1.333,1024,28,1.414,6,1,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
    --step--1: clamp(0.7502rem, 0.5286rem + 1.1078vw, 1.2376rem);
    --step-0: clamp(1rem, 0.6591rem + 1.7045vw, 1.75rem);
    --step-1: clamp(1.333rem, 0.8141rem + 2.5943vw, 2.4745rem);
    --step-2: clamp(1.7769rem, 0.9941rem + 3.9138vw, 3.4989rem);
    --step-3: clamp(2.3686rem, 1.1964rem + 5.8612vw, 4.9475rem);
    --step-4: clamp(3.1573rem, 1.4126rem + 8.7237vw, 6.9958rem);
    --step-5: clamp(4.2087rem, 1.6254rem + 12.9166vw, 9.892rem);
    --step-6: clamp(5.6102rem, 1.8025rem + 19.0388vw, 13.9873rem);
  }

/* @link https://utopia.fyi/space/calculator?c=320,16,1.333,1024,28,1.414,6,1,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */

:root {
    --space-3xs: clamp(0.25rem, 0.1648rem + 0.4261vw, 0.4375rem);
    --space-2xs: clamp(0.5rem, 0.3295rem + 0.8523vw, 0.875rem);
    --space-xs: clamp(0.75rem, 0.4943rem + 1.2784vw, 1.3125rem);
    --space-s: clamp(1rem, 0.6591rem + 1.7045vw, 1.75rem);
    --space-m: clamp(1.5rem, 0.9886rem + 2.5568vw, 2.625rem);
    --space-l: clamp(2rem, 1.3182rem + 3.4091vw, 3.5rem);
    --space-xl: clamp(3rem, 1.9773rem + 5.1136vw, 5.25rem);
    --space-2xl: clamp(4rem, 2.6364rem + 6.8182vw, 7rem);
    --space-3xl: clamp(6rem, 3.9545rem + 10.2273vw, 10.5rem);
  
    /* One-up pairs */
    --space-3xs-2xs: clamp(0.25rem, -0.0341rem + 1.4205vw, 0.875rem);
    --space-2xs-xs: clamp(0.5rem, 0.1307rem + 1.8466vw, 1.3125rem);
    --space-xs-s: clamp(0.75rem, 0.2955rem + 2.2727vw, 1.75rem);
    --space-s-m: clamp(1rem, 0.2614rem + 3.6932vw, 2.625rem);
    --space-m-l: clamp(1.5rem, 0.5909rem + 4.5455vw, 3.5rem);
    --space-l-xl: clamp(2rem, 0.5227rem + 7.3864vw, 5.25rem);
    --space-xl-2xl: clamp(3rem, 1.1818rem + 9.0909vw, 7rem);
    --space-2xl-3xl: clamp(4rem, 1.0455rem + 14.7727vw, 10.5rem);
}
  
body {
    height:64px; 
    font-family:'megaperls';
    /*background-image: url("images/Background-Image.png");*/
    background-color: var(--background);
    color:var(--darkblue);
    max-width: 1024px;
    margin:0 auto;
    padding:var(--space-l) var(--space-s-m) var(--space-m) var(--space-s-m);
    font-size:var(--step-0);
    display:flex; 
    flex-direction: column;
    min-height:100vh;
    font-variation-settings: "ROND" 0;
    font-weight: 100; 
}

.content{ /*content of the app*/
    flex:1;
    margin-top:var(--space-s-m);
}

/*
- Radio-Design
*/

.radioFrame{
    display:flex;
    flex-direction: row; 
    align-items: center;
    gap: var(--space-s);
    flex-wrap: wrap; 
}

.topContainer {
    display:flex; 
    flex-direction:row; 
    gap: var(--space-2xs-xs);
    flex: 1 1 20%; 
}

.buttonContainer {
    display:flex; 
    flex-direction: column;
    gap: var(--space-2xs-xs);
    flex: 1;
}

.flexButton {
    flex-grow: 1 !important;
}

.decoContainer{
    border-width:1px; 
    border-style:solid;
    border-color:var(--accent);
    border-radius: 0.5em;
    flex: 3;
    display:flex; 
    align-items: center;
    gap: 0.25em;
    padding: 0.25em; 
}

.waveElement {
    flex: 1; 
    background-color: var(--lightblue); 
    /*
    * Created with https://www.css-gradient.com
    * Gradient link: https://www.css-gradient.com/?colors=053dbe@0,01d72f@100&gt=l&gd=dtt&from=css
    */
    background: linear-gradient(0deg in oklch, var(--lightblue) 0%, var(--darkblue) 50%, var(--lightblue) 100%);
    /*depending on amount a border is not a good idea */
    border-style: solid; 
    border-color: var(--lightblue); 
    border-width: 1px;
    height: 25%; 
    border-radius: 0.25em; 
    transition: height 0.1s;
}

.radioButtonContainer {
    flex: 4 4 80%;
}

.radioButtonContainer form fieldset {
    padding: var(--space-2xs) calc(var(--space-2xs) * 0.95);
    border-radius: 0.5em;

    display: flex; 
    flex-direction: column;
    gap: 0.5em; 

    border-width:1px; 
    border-style:solid;
    border-radius: 0.5em; /*0% 0.5em;*/
    border-color: var(--lightblue);
    
    color:var(--darkblue);
    background-color: var(--background);
    /*padding: 0.75em 0.7em;*/
}
/*if the Radio has focus, give the form focus*/
/*interesting enough... this also triggers, if the radiobutton is clicked not only on focus*/
.radioButtonContainer form fieldset:focus-within{
    outline-offset: 0.1rem;
    outline: 2px solid var(--lightAccent);
}


/*Clickable Radiobutton-Divs*/
/*Well, I guess, I can just use the label? */
.radioButtonCard > label { /*this is the radiobutton*/
    min-width:100%;
    border-radius: 0.25em; /*recalculate this*/
    border: 1px solid var(--accent);
    padding: 0.5em 0.5em 0.3em 0.5em; 
    display: flex; 
    gap: 0.5em;
    cursor:pointer;
    /*font-feature-settings: "smcp" on;*/
}

#listTarget input[type=radio]:checked + label {
    background-color: var(--accent);
    color: var(--background);
}

@media(hover:hover){
    /*These are media queries for hovering on devices that actually have hover, else nothing
    See: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/hover*/
    #listTarget input[type=radio]:hover + label {
        background-color: var(--lightAccent);
        color: var(--background);
    }
}

/*hide radiobuttons*/
input[type="radio"]{
    /*display:none; */
    position: fixed;
    opacity: 0;
    pointer-events: none;
}

/*Upload Element - hiding it at the moment*/
#fileElem {
  display: none;
}


/*
- Other things
*/

h1, h2 {
    text-transform: uppercase;
    color: var(--lightblue);
    font-variation-settings: "ROND" 1;
    font-weight: 800; 
}

h1 {
    padding-top:0.0625em; 
    font-size:var(--step-2); 
}

h2 {
    font-size:var(--step-1); 
    margin-top: 1.25em;
}

* { /*all text*/
    color:var(--lightblue); 
}

.destinationText{
    font-size:var(--step-2);
    color:var(--accent);
}

.small{
    font-size:var(--step-0);
}

.hidden {
    display:none;     
}

.dotted {
    border:none; 
    border-top: 1px solid var(--lightblue);
}

/* ------------
layout
------------ */
.sameRow {
    display:flex; 
    flex-direction:row;
    justify-content:space-between;
    align-items:end; /*center; */
    gap:var(--space-2xs-xs);
    flex-wrap:wrap;
}

.sameRowCondense {
    display:flex; 
    flex-direction:row;
    align-items:end;
    gap:var(--space-2xs-xs);
    flex-wrap:wrap; 
}

.button {
    all:unset;
    font-size:var(--step--1);
    box-sizing: border-box;
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;

    border-width:1px; 
    border-style: solid;
    color: var(--darkblue);
    font-family:'megaperls';
    background-color: var(--background);
    border-radius: 0.5em; /*0% 0.5em;*/
    border-color: var(--lightblue);
    padding: 0.75em 0.75em;
    cursor: pointer;
    font-weight: 500; 
    text-align: center; 

    transition: box-shadow 1s;
    box-shadow:0 0 0px var(--accent);

}


.cardButton {
    padding: 0em !important;
}

.borderless {
    border:none !important;
    padding: 0.75em 0em;
    background-color:transparent !important; 
    color:var(--darkblue) !important;
    box-shadow:0 0 0px var(--accent);
}

@media (hover: hover) {
    .borderless.button:hover {
        color:var(--accent)!important;
        box-shadow:0 0 0px var(--accent);
    }
}

.borderless.button:active {
    color:var(--accent)!important;
    box-shadow:0 0 0px var(--accent);
}

@media (hover: hover) {
    .button:hover {
        color:var(--background); 
        background-color: var(--lightblue);
        border-color: var(--darkblue);
    }
}

.button:active {
    color:var(--background); 
    background-color: var(--lightblue);
    border-color: var(--darkblue);
    border-style:inset;
    box-shadow:0 0 10px var(--accent);
    transition-duration: 0.05s;
}


/* ------------
Everything related to the breakout-button
https://piccalil.li/blog/create-a-semantic-break-out-button-to-make-an-entire-element-clickable/#heading-creating-the-breakout-button-component
THIS IS PROBABLY NOT NEEDED HERE BUT MAYBE FOR THE RADIOBUTTONS

------------ */
/*.theCard{
    position:relative;
    min-height:75%;
    display:flex; 
    justify-content: space-between;
    flex-direction: column;
}*/
/*
.breakout-button{
    /*font: inherit;*/
    /*font-weight: 600;*/
/*    padding: 0.6rem 2rem;
    background: transparent;
    color: currentColor;
    border: 1px solid;
    transition: background 100ms ease;
    position: static;
}

.breakout-button,
.breakout-button::before {
  cursor: pointer;
}

.breakout-button::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.breakout-button:focus {
    outline: none;
}
  
.breakout-button:hover {
    background: #333333;
}

.breakout-button:focus::before {
    border-radius: 4px;
    outline: 1px solid var(--accent);
    outline-offset: 0.4rem;
}

body:has(.breakout-button:focus) .mutable {
    border-color:var(--mutedblue);
    color:var(--mutedblue) !important;
  }

body:has(.breakout-button:hover) .mutable {
    border-color:var(--mutedblue);
    color:var(--mutedblue) !important;
  }*/

/* ------------
All things regarding the dialog
------------ */
  
dialog{
    margin:20px auto; 
    border-radius: 8px;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, 0.25); 
    padding: 0;
    overflow: hidden;
    background-color: var(--background);

    border-style:solid;
    border-width:1px;
    border-color: var(--accent);
}

dialog > .dialogContainer {
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-items: start;
}

.dialogContent {
    overflow:auto;
    max-height:70vh;
    padding: 0.8rem 1.6rem;   
}

.dialogContent > form {
    display: flex; 
    gap: var(--space-s);
    flex-direction: column;
}

.formGroup > label {
    min-width: 200px;
}

.formGroup > input {
    flex-grow: 1; 
}


dialog > .dialogContainer > header {
    border-bottom: 0.5px solid var(--accent);
    padding: 0.8rem 1.6rem;
}

.buttonList {
    border-top: 0.5px solid var(--accent);
    padding: 0.8rem 1.6rem;
}

::backdrop {
    /*found on css-tricks*/
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.2),
        rgba(0, 0, 0, 0.2) 1px,
        rgba(0, 0, 0, 0.3) 1px,
        rgba(0, 0, 0, 0.3) 20px
      );
      backdrop-filter: blur(3px);
  }
  


 /* unvisited link */
 a:link {
    color: var(--accent);
  }
  
  /* visited link */
  a:visited {
    color: var(--lightblue);
  }
  
  /* mouse over link */
  @media(hover:hover){
    a:hover {
        color: var(--darkblue);
    }
  }
  
  /* selected link */
  a:active {
    color: var(--darkblue);
  } 


  /*Focus-Styles
  Very nice source: https://medienbaecker.com/articles/focus-outlines
  Note that radiogroups / fieldsets need their proper ":focus-within"-declaration
  */
*:focus-visible {
    outline-offset: 0.1rem;
    outline: 2px solid var(--lightAccent);
}