﻿/* Basic styles for inputs */
input, select, textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* When the form has class was-validated and a field is invalid */
.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
    border-color: #dc3545; /* red border */
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.275rem) center;
    background-size: calc(0.75em + 0.55rem) calc(0.75em + 0.55rem);
}

/* When the form has class was-validated and field is valid */
.was-validated input:valid,
.was-validated select:valid,
.was-validated textarea:valid {
    border-color: #198754; /* green border */
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.275rem) center;
    background-size: calc(0.75em + 0.55rem) calc(0.75em + 0.55rem);
}

/* Feedback messages */
.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: none;
    color: #198754;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* Show feedback if field is touched and validated */
.was-validated input:invalid ~ .invalid-feedback,
.was-validated select:invalid ~ .invalid-feedback,
.was-validated textarea:invalid ~ .invalid-feedback {
    display: block;
}

.was-validated input:valid ~ .valid-feedback,
.was-validated select:valid ~ .valid-feedback,
.was-validated textarea:valid ~ .valid-feedback {
    display: block;
}


button.close {
    margin-top: 0 !important;
    margin-bottom: 0;
    font-size: 18px;
}

.alertspan {
    font-size: 16px;
}

.alert-danger {
    background-color: #de6773;
    border-color: #dc3545;
    color: #fff;
    border-left: 5px solid #dc3545;
}

.alert-warning {
    background-color: #d19f0b;
    border-color: #f1c40f;
    color: #fff;
    border-left: 5px solid #f1c40f;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-left: 5px solid #28a745;
}

.toast-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    padding: 15px 20px;
    font-size: 13px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.6s ease;
    transform: translateX(100%);
}

    .toast-alert.show {
        opacity: 1;
        transform: translateX(0);
    }

    .toast-alert.fade-out {
        opacity: 0;
    }