/* Autofill style deactivate */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: var(--text-color) !important;
}

/*  Inputs preset  */

input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    outline: none;
    font-family: "Outfit", sans-serif;
}

/*      Floating input      */
.input-floating {
    position: relative;
    width: 100%;
}

.input-floating input,
.input-floating select,
.input-floating textarea {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    font-size: 0.9rem;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.2);
    outline: none;
    font-family: "Outfit", sans-serif;
    color: var(--text-color);
    padding-left: 0.75rem;
}

.input-floating textarea{
    width: 100%;
    height: auto;
    box-sizing: border-box;
    font-size: 0.9rem;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.2);
    outline: none;
    font-family: "Outfit", sans-serif;
    color: var(--text-color);
    padding: 0.75rem;
    resize: none;
}

.input-floating label {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    font-size: 0.9rem;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    transition: all 0.2s ease;
}

.input-floating input[type=text]:focus+label,
.input-floating input[type=number]:focus+label,
.input-floating input[type=email]:focus+label,
.input-floating input[type=password]:focus+label,
.input-floating input[type=text]:not(:placeholder-shown)+label,
.input-floating input[type=number]:not(:placeholder-shown)+label,
.input-floating input[type=email]:not(:placeholder-shown)+label,
.input-floating input[type=password]:not(:placeholder-shown)+label {
    top: 0;
    font-size: 0.8rem;
}

.input-floating input[type="date"]+label,
.input-floating input[type="time"]+label {
    top: 0;
    font-size: 0.8rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.8);
}

.input-floating select+label {
    top: 0;
    font-size: 0.8rem;
}

.input-floating textarea:focus+label,
.input-floating textarea:not(:placeholder-shown)+label {
    top: 0;
    font-size: 0.8rem;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

option {
    color: black;
    background-color: #fff;
}


/*      Group input     */
.input-group {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.input-group input {
    width: 100%;
    margin: 0;
    border: none;
    font-size: 0.9rem;
    padding: 0;
    padding-left: 5px;
    background: transparent;
    outline: none;
    font-family: "Outfit", sans-serif;
    color: var(--text-color);
}

.input-group i {
    margin: 0;
    padding: 0;
    font-size: 25px;
    width: fit-content;
    color: var(--text-color);
}

.input-group i.bi-search {
    font-size: 20px;
}


/*      Group select    */
.select-group {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    border: none;
    border-bottom: 2px solid var(--primary-color);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.select-group select {
    width: 100%;
    height: 40px;
    margin: 0;
    border: none;
    font-size: 0.9rem;
    background: transparent;
    outline: none;
    font-family: "Outfit", sans-serif;
    color: var(--text-color-light);
}

.select-group label {
    width: auto;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 40px;
    padding: 0px 7px;
    color: var(--text-color-light);
}


/*   Buttons   */
.btn {
    position: relative;
    font-size: 1rem;
    padding: 0.5rem 1.3rem;
    border-radius: 5px;
    border: none;
    background: none;
    font-family: "Outfit", sans-serif;
    cursor: pointer;
    overflow: hidden;
    transition: background-color 0.25s
}

.btn-close {
    background-color: var(--secondary-color);
    color: var(--text-color-light);
}

.btn-close:hover {
    background-color: #1d1d1d;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.btn-primary:hover {
    background-color: #850000;
}


.btn-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 0;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-color-light);
}

.btn-link:hover{
    background-color: rgba(0, 0, 0, 0.6);;
}

.btn-link span {
    padding-right: 30px;
}

.btn-link .bi {
    line-height: 1rem;
}

.btn-form {
    height: 100%;
    background-color: var(--primary-color);
    color: white;
}

/*   Radio input   */
.radio-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.radio-wrapper input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background-color: transparent;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radio-wrapper input[type="radio"]::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.radio-wrapper input[type="radio"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
}

.radio-wrapper:hover input[type="radio"] {
    border-color: var(--primary-color);
}

.radio-wrapper input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 8px 2px rgba(226, 43, 43, 0.3);
}

/*  Switch  */

.switch-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.switch-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 44px;
    height: 22px;
    background: #ccc;
    border-radius: 22px;
    position: relative;
    cursor: pointer;
    transition: background 0.25s ease;
}

.switch-wrapper input[type="checkbox"]::before {
    content: "";
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.switch-wrapper input[type="checkbox"]:checked {
    background: var(--primary-color);
}

.switch-wrapper input[type="checkbox"]:checked::before {
    transform: translate(100%, -50%);
}

.switch-wrapper:hover input[type="checkbox"] {
    background: #bdbdbd;
}

.switch-wrapper input[type="checkbox"]:checked:hover {
    background: var(--primary-color);
}

.switch-wrapper input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 8px 2px rgba(226, 43, 43, 0.3);
}

.file-input-group {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

/* Skryj skutečný input */
#file {
    display: none;
}

/* Stylované tlačítko */
.file-label {
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
    min-width: 120px;
    background: var(--secondary-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    overflow: hidden;
    /* zabrání přesahu pseudo-prvku */
    transition: all 0.2s;
}

.file-label:hover {
    color: var(--text-color-light);
    /* jemný efekt */
}

/* Text s názvem souboru */
.file-name {
    margin-left: 10px;
    font-size: 14px;
    color: var(--text-light);
    white-space: nowrap;
    text-overflow: ellipsis;
}


@media screen and (max-width: 1000px) {
    .btn-form {
        width: 100%;
    }
}