:root
{
    --store_icon_size: max(25px, 2.5vh);
    --cred_icon_size: max(50px, 4vh);
}

.fade {
  animation-name: fade;
  animation-duration: 0.5s;
}

@keyframes fade {
  from {opacity: 0}
  to {opacity: 1}
}



.wrapper
{
    border-top: 1px solid gray;
    flex: 1;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: max(15px, 1vh);
    overflow: hidden;
    overflow-y: auto;
    
}
.wrapper[data-uidok="0"]
{
    background: transparent;
    justify-content: center;
    align-items: center;
}
.wrapper > *
{
    box-sizing: border-box;
}
.input_container
{
    justify-self: center;
    align-self: center;
   display: flex;
  flex-direction: column;
  border: 1px solid black;
  border-radius: 10px;
  padding: 10px;
  box-sizing: border-box;
  flex-grow: 0;
  width: fit-content;
  background: white;
  box-shadow: 0px 0px 7px 1px #000000;
  min-width: 400px;
  max-width: max(550px, 60vw);
  
}

@media screen and (max-width: 800px)
{
    .wrapper
    {
        padding: 5px;
        padding-top: 15px;
    }
    .input_container
    {
        box-shadow: none;
        min-width: 90%;
        max-width: 90%;
    }
}
.input_container > div
{
    flex: 1;
    box-sizing: border-box;
}
.buttonrow
{
    padding: 5px;
    display: flex;
    flex-direction: row;
    box-sizing: border-box;
    gap: 10px;
    margin-top: 20px;
}
.buttonrow > *
{
    flex: 1;
    min-width: 45%;
}
.mainbutton 
{
    border: 1px solid #999966;
    transition: all 0.15s ease;
    padding: 10px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #999966;
    color: white;
    user-select: none;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-content: flex-start;
    white-space: nowrap;
    text-align: right;
    font-size: 100%;
}
.mainbutton[data-enabled="0"]
{
    pointer-events: none;
    filter: grayscale(100%);
}
.mainbutton img
{
    width: clamp(25px, 3vh, 35px);
    height: auto;
    aspect-ratio: 1/1;
    float: left;
    filter: invert(100%);
}
.mainbutton:hover
{
    filter: brightness(110%);
    border-color: black;
}
.mainbutton:active
{
    transition: none;
    filter: invert(100%);
    
}
.button[data-enabled="0"]
{
    filter: grayscale(100%);
    pointer-events: none;
    opacity: 0.6;
}
button:hover 
{
    
}
button:active
{
    transition: none;
    filter: invert(100%);
}
.mainbutton  > div
{
    flex: 1;
}

.prompt
{
    flex-grow: 0;
    color: #374151;
    margin-bottom: 20px;
}

.input
{
    flex-grow: 1;
    
}

.credinput
{
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
  text-transform: uppercase;
  text-align: center;
}

.credinput:focus 
{
  outline: none;
  border-color: #2563eb; /* Blau */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}


.simplemessagewrapper
{
    padding: 8px;
    background: rgba(0, 0, 255, 0.2);
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    border-left: 5px solid blue;
    margin-bottom: 20px;
    font-size: 90%;
}
.simplemessagewrapper[data-color="red"]
{
    background: rgba(255, 0, 0, 0.2);
    border-left: 5px solid red;
    color: maroon;
}
.simplemessagewrapper > div
{
    flex: 1;
    box-sizing: border-box;
}
.simplemessagewrapper[data-visible="0"]
{
    display: none;
}

.credentials_wrapper
{
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-width: 800px;
    margin-bottom: 1vh;
    gap: 1vh;
}
@media screen and (max-width: 800px)
{
    .credentials_wrapper
    {
        max-width: 100%;
    }
}

.welcome_wrapper
{
    box-sizing: border-box;
    background: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    
}
.welcome_wrapper > div
{
    flex: 1;
    flex-grow: 0;
    box-sizing: border-box;
}
@media screen and (max-width: 800px)
{
    .welcome_wrapper
    {
        padding: 5px;
    }
}
.welcome
{
    
    margin-bottom: 5px;
    
    display: flex;
    flex-direction: row;
    
}
.welcome_title
{
    font-size: 120%;
    display: flex;
    flex-direction: row;
}
.welcome_title > div
{
    flex: 1;
    box-sizing: border-box;
    white-space: nowrap;
}
.welcome_title[data-msg_status="closed"]
{
    margin-bottom: 10px;
}

.welcome > div
{
    flex: 1;
    box-sizing: border-box;
}
.welcome_wrapper[data-visible="0"]
{
    display: none;
}

.closebox
{
    transition: all 0.2s ease;
    flex-grow: 0 !important;
    cursor: pointer;
    font-size: 90%;
    font-weight: normal;
    background: white;
    padding: 2px;
    align-self: flex-start;
    margin-right: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
    user-select: none;
    
}
.closebox[data-status="open"]
{
    transform: rotate(180deg);
}
.closebox:hover
{
    background: #e1e1d0;
}
.closebox:active
{
    transition: none;
    color: blue;
}
.closebox img
{
    width: 15px;
    height: auto;
}

.welcome_info
{
    font-size: 95%;
    color: black;
    margin-bottom: 10px;

}
.welcome_infosmall
{
    font-size: 90%;
    color: dimgray;
    
}
.credinfo_row
{
    display: flex;
    flex-direction: row;
    gap: 15px;
    box-sizing: border-box;
}
.credinfo_row > div:first-child
{
    box-sizing: border-box;
    flex-basis: 25vw;
    min-width: 25vw;
    max-width: 200px;
    white-space: nowrap;
}
.item_links
{
    flex: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    margin-bottom: 3px;
}
.item_links > div
{
    flex: 1;
    flex-grow: 0;
}


/* schlichtes Link-Styling */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.singlerow_withicon
{
    display: flex;
    flex-direction: row;
    gap: 10px;
}
.singlerow_withicon > div
{
    flex: 1;
    flex-grow: 1;
    display: flex;
    box-sizing: border-box;
}
.singlerow_withicon > div:first-child
{
    flex-grow: 0;
}
.singlerow_withicon > div:first-child img
{
    width: var(--cred_icon_size);
    height: var(--cred_icon_size);
    aspect-ratio: 1 / 1;
}
@media screen and (max-width: 500px)
{
    .singlerow_withicon > div:first-child
    {
        display: none;
    }
}

.pagelink
{
    color: blue;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    font-size: 90%;
    font-weight: normal;
}
.pagelink > div
{
    transition: all 0.2s ease;
    flex: 1;
    flex-grow: 0;
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-flex;
    cursor: pointer;
    
}
.pagelink > div:first-child
{
    flex-grow: 0;
    
}
.pagelink img
{
    height: 19px;
    width: auto;
    aspect-ratio: 1 / 1;
}
.pagelink > div:hover
{
    color: red;
}
.pagelink > div:active
{
    color: black;
    transition: none;
    
}

.sectiontitle
{
  background: dimgray;
  margin-bottom: 15px;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 90%;
  box-sizing: border-box;
  margin-top: 25px;
  color: gray;
  text-align: center;
  background: #e1e1d0;
  position: relative;
  height: 35px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.sectiontitle::before 
{
content: '';
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 17px 17px 0 17px;
  border-color: #e1e1d0 transparent transparent transparent;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
}


.titlelink
{
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.titlelink:hover
{
    color: red;
}
.titlelink:active
{
    color: blue;
}


.credinfo_with_store
{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}
.credinfo_with_store > div
{
    flex: 1;
    
}
.credinfo_with_store > div:last-child
{
    flex-grow: 0;
}
@media screen and (max-width: 600px)
{
    .credinfo_with_store > div:last-child
    {
        display: none;
    }
    
}

.storeinfo .storeimg
{
    height: var(--store_icon_size);
    width: var(--store_icon_size);
    min-width: var(--store_icon_size);
    min-height: var(--store_icon_size);
    cursor: pointer;
    transition: all 0.2s ease;
}
.storeinfo .storeimg:active
{
    filter: invert(100%);
}
.storeinfo .storeimg:hover
{
    filter: brightness(110%);
}
.storeinfo .storeimg[data-store="apple"]
{
    display: none;
}

.storeinfo .storeimg[data-store="google"]
{
    display: block;
}

@supports (-webkit-touch-callout: none) 
{
    .storeinfo .storeimg[data-store="apple"]
    {
        display: block;
    }

}


.credinfo
{
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
}
.credinfo > div
{
    flex: 1;
    display: flex;
    flex-direction:row;
    margin-bottom: 5px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
}
.nocreds_needed
{
    color: gray;
    font-size: 90%;
}
.crednotes
{
    width: 100%;
    font-size: 75%; 
    margin-top: 5px; 
    color: gray; 
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 3px;
}
.crednotes > div
{
    flex: 1;
    box-sizing: border-box;
}

.mail
{
    letter-spacing: 1px;
    color: black;
    white-space: nowrap;
    background: whitesmoke;
    padding: 1px 2px;
    border-radius: 5px;
}


.gui_bottomcontent
{
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.gui_bottomcontent > div
{
    flex: 1;
    flex-grow: 0;
}

.copyable img
{
    width: 15px;
    height: auto;
    margin-left: 2px;
}
.copyable[data-copied="1"]::after
{
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("../assets/greencheck.png");
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 5px;
}

.plain-list
{
    margin: 0;
    padding-left: 1rem; 
}
li
{
    margin-bottom: 5px;
}



@media screen and (max-width: 500px)
{
    .gui_tabcontrol_buttons
    {
        gap: 6px;
    }
    .welcome_wrapper
    {
        
    }
    .cred_item_info_title
    {
        text-align: right;
        justify-content: flex-end;
        padding-right: 10px;
    }
    

}


.fileview_wrapper
{
    padding:10px;
    height: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2vw;
    justify-content: flex-start;
    align-content: flex-start;
    justify-content: center;
}
.fileview_wrapper fileitem
{
    
}

.fileitem
{
    /* Karte: Symbol oben, Name darunter */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 110px;
    padding: 14px 10px 12px;
    border: 1px solid silver;
    border-radius: 10px;
    background: #e1e1d0;
    cursor: pointer;
    text-align: center;
    position: relative;          /* Anker für das eingeblendete Datum */
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}
.fileitem[data-downloads="0"]::before
{
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    background-image: url("/studikompass/assets/pages/files/newfile.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 2;
}
.fileitem:hover
{
    border-color: black;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}
.fileitem:active
{
    transition: none;
    filter: invert(100%);
}

.fileitem-icon
{
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    margin-bottom: 8px;
    pointer-events: none;        /* Klicks gehen ans .fileitem, nicht ans Bild */
}

.fileitem-name
{
    font-size: 13px;
    line-height: 1.3;
    color: #333333;
    /* Lange Namen auf max. 2 Zeilen kürzen, dann "..." */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    max-width: 100%;
}
.fileitem-date
{
    font-size: 11px;
    color: #ffffff;
    background: rgba(40, 40, 40, 0.85);
    padding: 3px 8px;
    border-radius: 6px;
    position: absolute;
    top: 8px;                    /* vorher: bottom: 8px; */
    left: 50%;
    transform: translateX(-50%) translateY(-6px);   /* vorher: translateY(6px) */
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fileitem:hover .fileitem-date
{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* Auf kleinen Bildschirmen (Handys): Dateiname ausblenden, kompaktere Karte */
@media (max-width: 500px)
{
    .fileview_wrapper
    {
        
    }
    .fileitem
    {
        flex-grow: 0;
        flex-basis: auto;
    }

    .fileitem-name
    {
        
        line-height: 1.25;
        /* Auf kleinen Geräten nur noch 1 Zeile -> kompakter, einheitliche Höhe */
        -webkit-line-clamp: 1;
    }

    .fileitem-icon
    {
        margin-bottom: 0;
        width: 40px;
        height: 40px;
    }

    /* Datum auf Touch ohne Hover: dauerhaft klein unter dem Symbol */
    .fileitem-date
    {
        display: none;
    }
}