@import url(./Constants.css);


body {
    font-family: 'Courier New', Courier, monospace;
    background-color: black;
    color: white;
    overflow-y: hidden;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../assets/logo_ibii.png');
    background-repeat: no-repeat;
    background-size: 70%;
    background-position: calc(50% + 4px) calc(50% + 12px);
    /* NO IDEA dlaczego to jest true center, pewnie src jest zepsute*/
    margin: 0px;
    user-select: none;
}

span,
input,
button,
label,
select,
option,
textarea,
div,
p,
h3,
h2,
h1 {
    font-family: 'Courier New', Courier, monospace;
}

@media (max-width: 1100px) {
    body {
        background-size: 110%;
        overflow-y: auto;
    }
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=radio] {
    border-radius: 20px;
}

@keyframes pulse-error {
    0% {
        background-color: red;
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }

    50% {
        background-color: #ff4444;
        box-shadow: 0 0 0 8px rgba(255, 68, 68, 0);
    }

    100% {
        background-color: red;
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

@keyframes pulse-success {
    0% {
        background-color: #0ffa84;
        box-shadow: 0 0 0 0 rgba(15, 250, 132, 0.7);
    }

    50% {
        background-color: #15ff99;
        box-shadow: 0 0 0 8px rgba(21, 255, 153, 0);
    }

    100% {
        background-color: #0ffa84;
        box-shadow: 0 0 0 0 rgba(15, 250, 132, 0);
    }
}


/* Siatka sekcji */
.grid-container {
    display: grid;
    grid-template-columns: 1fr var(--MiddleSegmentWidth) 1fr;
    gap: 10px;
    height: 100vh;
    max-height: 100vh;
    justify-items: center;
}



/* Sekcje */
.left {
    display: grid;
    min-width: 0;
    /* background-color: blue; */
    /* dla debugowania */
}

.logoSKNI {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: auto;
}

.middle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    width: 100%;
    /* background-color: red; */
    /* dla debugowania */

    height: var(--MiddleSegmentMaxHeight);
    margin-top: 50%;
    transform: translateY(-50%);

    border-right: solid 40px var(--PaddingLineGradient);
    border-left: solid 40px var(--PaddingLineGradient);
}

/* Boczne linie środkowej sekcji */
.leftLine {
    background: var(--PaddingLineGradient);
    position: fixed;
    height: 100%;
    width: var(--LineWidth);
    pointer-events: none;
}

.rightLine {
    background: var(--PaddingLineGradient);
    position: fixed;
    right: 0;
    height: 100%;
    width: var(--LineWidth);
    pointer-events: none;
}

.leftLine::before,
.rightLine::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(200, 200, 200, 0.2), rgba(200, 200, 200, 0) 110%);
    opacity: 1;
    z-index: 0;
}

.leftLine::after,
.rightLine::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(15, 133, 250, 1), rgba(15, 231, 250, 0) 110%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.leftLine.active::after,
.rightLine.active::after {
    opacity: 1;
}

.leftLine .successLayer,
.rightLine .successLayer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(15, 250, 132, 1), rgba(15, 250, 93, 0) 110%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 2;
}

.leftLine .errorLayer,
.rightLine .errorLayer {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(250, 15, 15, 1), rgba(250, 80, 80, 0) 110%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 3;
}

.right {
    display: flex;
    justify-content: flex-end;
    align-items: start;
    min-width: 0;
    /* background-color: blue; */
    /* dla debugowania */
}


/* Responsywność z svh i vw*/
@media (max-width: 1100px) {
    .grid-container {
        display: grid;
        justify-content: center;
        align-content: center;
        align-items: center;
        height: 100vh;
        width: 100vw;
        top: 0;
        position: relative;
    }

    .left,
    .right {
        display: none;
    }

    .middle {
        margin-top: 0;
        transform: none;
        position: absolute;
    }

    .leftLine,
    .rightLine {
        height: 100vh;
        top: 0;
        width: var(--PhoneLineWidth);
    }
}

#loggedInIndicator {
    position: absolute;
    top: 5%;
    left: 5%;
    width: auto;
    max-width: 200px;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 11;
    display: flex;
    align-items: center;
    gap: 10px;

    &.mobile {
        top: unset;
        left: unset;
        position: relative;
        display: none;
    }

    @media (max-width: 1100px) {
        &.mobile {
            display: flex;
        }
    }

    &>#indicator {
        position: relative;
        height: 15px;
        border-radius: 100%;
        aspect-ratio: 1 / 1;
        background-color: red;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10;
        flex-shrink: 0;
    }

    &>#indicator.animate.error {
        animation: pulse-error 2s infinite;
    }

    &>#indicator.animate.success {
        animation: pulse-success 2s infinite;
        background-color: #0ffa84;
    }

    .statusTooltip {
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 11px;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
        z-index: 12;
    }

    .statusTooltip.error {
        color: black;
        background-color: rgba(255, 0, 0, 1);
    }

    .statusTooltip.success {
        color: black;
        background-color: rgba(15, 250, 132, 1);
    }

    &:hover .statusTooltip {
        opacity: 1;
        visibility: visible;
    }
}

#zmienSesje {
    position: absolute;
    top: 15%;
    left: 5%;
    width: auto;
    max-width: 200px;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 14;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    &>span:last-child {
        font-size: 9px;
        color: rgb(176, 176, 176);
    }

    &>button {
        border-radius: 6px;
        border: solid 1px black;
        padding: 8px 12px;
        font-size: 14px;
        line-height: 25px;
        background: #56CFF8;
        transition: background .3s ease, border .3s ease, color .3s ease;
        text-shadow: 1px 1px 2px #805237;
        cursor: pointer;
    }

    &>button:hover {
        background: #418CD9;
        color: white;
        cursor: pointer;
    }
}

.dynamicErrorTooltip {
    font-family: 'Courier New', Courier, monospace;
    position: absolute;
    background-color: #ff4d4f;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1;
    /* trollge */
    transform: translateY(150%);
    display: none;
}