/* Validazione form - jQuery Validate */
input.error,
select.error,
textarea.error {
    border-color: #dc2626 !important;
    border-width: 1px !important;
}

input.error:focus,
select.error:focus,
textarea.error:focus {
    border-color: #dc2626 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

label.error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* Fix per checkbox e radio con errore */
input[type="checkbox"].error,
input[type="radio"].error {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Validazione success (opzionale) */
input.valid,
select.valid,
textarea.valid {
    border-color: #16a34a;
}

/* Bootstrap Modal Simulation */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.fade:not(.show) {
    opacity: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
    padding: 0;
}

.modal-body {
    padding: 0;
    margin: 0;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
}

.modal-backdrop.show {
    opacity: 0.5;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 0;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.5rem - 1px);
    border-bottom-left-radius: calc(0.5rem - 1px);
}

.btn-close {
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    width: 1em;
    height: 1em;
    padding: 0;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Modal sizes */
@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }

    .modal-dialog-centered {
        min-height: calc(100% - 3.5rem);
    }
}

.modal-sm {
    max-width: 300px;
}

@media (min-width: 992px) {
    .modal-lg,
    .modal-xl {
        max-width: 800px;
    }
}

@media (min-width: 1200px) {
    .modal-xl {
        max-width: 1140px;
    }
}

/* Fix header buttons hover */
header button:not([style*="background-color: #FF123E"]):hover {
    color: #111827 !important;
    background-color: #f9fafb !important;
}

header button[style*="background-color: #FF123E"]:hover {
    background-color: #FF123E !important;
    opacity: 0.9;
}

/* Widget classifica - padding top */
.widget-classifica {
    padding-top: 15px;
}

/* Teaser container - nascosto su mobile */
@media (max-width: 991px) {
    .teaser-container {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .teaser-container {
        display: block !important;
    }
}

/* Bottone accedi per votare - hover bianco */
button[onclick*="authFlow.login"]:hover {
    color: white !important;
    background-color: #FF123E !important;
}
