﻿/* Dialog container */
.spbuk-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
    color: #545454;
    padding: .625em;
    overflow-y: auto; /* overlay is scrollable */
    overflow-x: hidden;
    transition: background-color .1s;
    padding-top: 1em;
    padding-bottom: 1em;
}

.spbuk-dialog-content {
    position: relative;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 95vw;
    box-sizing: border-box;
}

@media (min-width: 769px) and (max-height: 600px) {
    .spbuk-dialog {
        align-items: flex-start;
        padding-top: 1em;
        padding-bottom: 1em;
    }
}

@media (max-width: 769px) {
    .spbuk-dialog {
        align-items: flex-start;
        padding-top: 1em;
        padding-bottom: 1em;
    }
}

.spbuk-dialog-title {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

.spbuk-dialog-message {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.spbuk-dialog-icon {
    position: relative;
    width: 5em;
    height: 5em;
    margin: 1em auto 1.5em;
    border: 0.25em solid rgba(0, 0, 0, 0);
    border-radius: 50%;
    border-color: #000;
    font-family: inherit;
    line-height: 5em;
    cursor: default;
    user-select: none;
}

    .spbuk-dialog-icon .spbuk-dialog-icon-content {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 3.75em;
    }


.spbuk-dialog-icon-animation {
    animation: icon-content-animation .5s;
}

.spbuk-dialog-icon-border-animation {
    animation: icon-border-animation .5s;
}



.show-dialog {
    animation: dialog-show 0.3s;
}

.hide-dialog {
    animation: dialog-hide 0.3s forwards;
}

.spbuk-dialog-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    background-color: #28a745;
    animation: timer-bar-animation linear forwards;
}

.spbuk-dialog-form-input {
    width: 100%;
    padding: 8px;
    margin: 8px 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}


@keyframes timer-bar-animation {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

@keyframes dialog-show {
    0% {
        transform: scale(0.7);
    }

    45% {
        transform: scale(1.05);
    }

    80% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes dialog-hide {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.5);
        opacity: 0;
    }
}

@keyframes icon-content-animation {
    0% {
        transform: rotateZ(45deg);
        opacity: 0;
    }

    25% {
        transform: rotateZ(-25deg);
        opacity: 0.4;
    }

    50% {
        transform: rotateZ(15deg);
        opacity: 0.8;
    }

    75% {
        transform: rotateZ(-5deg);
        opacity: 1;
    }

    100% {
        transform: rotateX(0);
        opacity: 1;
    }
}

@keyframes icon-border-animation {
    0% {
        transform: rotateX(100deg);
        opacity: 0;
    }

    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}



/* Close button */
.spbuk-dialog-close {
    display: flex;
    justify-self: end;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    border: 0;
    background: none;
    font-weight: bold;
    color: #CCCCCC;
}

    .spbuk-dialog-close:hover,
    .spbuk-dialog-close:focus {
        color: #AAAAAA;
        text-decoration: none;
        transition: color 0.3s;
    }

/* Buttons */

.spbuk-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: end;
}

@media (max-width: 768px) {
    .spbuk-dialog-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }
}


.spbuk-dialog-btn-yes {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

    .spbuk-dialog-btn-yes:hover {
        background-color: #218838;
    }

.spbuk-dialog-btn-no {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

    .spbuk-dialog-btn-no:hover {
        background-color: #c82333;
    }

/* Modal sizes */

.spbuk-dialog-auto {
    width: auto;
    max-width: 80%;
    margin: 1em;
}

.spbuk-dialog-small {
    width: 30vw;
    min-width: 500px;
    max-width: 600px;
}

.spbuk-dialog-medium {
    width: 50%;
}

.spbuk-dialog-large {
    width: 70%;
}

.spbuk-dialog-extralarge {
    width: 80%;
}

@media (max-width: 768px) {
    .spbuk-dialog-small,
    .spbuk-dialog-medium,
    .spbuk-dialog-large,
    .spbuk-dialog-extralarge {
        width: 90%;
        min-width: auto;
        max-width: auto;
    }
}

.spbuk-dialog-error-message {
    color: red;
    font-size: 10px;
    margin-top: 5px;
}

.spbuk-dialog-select-error-message {
    color: red;
    display: flex;
    justify-self: center;
    font-size: 0.8em;
    margin-top: 5px;
    margin-bottom: 5px;
}

.spbuk-dialog-form-check {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.spbuk-dialog-form-check-input {
    /* Double-sized Checkboxes */
    -ms-transform: scale(2); /* IE */
    -moz-transform: scale(2); /* FF */
    -webkit-transform: scale(2); /* Safari and Chrome */
    -o-transform: scale(2); /* Opera */
    padding: 10px;
}

.spbuk-dialog-form-check-label {
    margin-left: 10px;
}
