/* asset-mapper app.css */
/* custom styles */

/* Error state for form fields */
.border-red-500 {
    border-color: #ef4444 !important;
}

/* for row clicks in tables */
.tr-link:hover {
    cursor: pointer;
}
.tr-link:hover [data-tr-link-target="exclude"] {
    cursor: default;
}

/*  invitation, booking pages */
@media (max-width: 1279px) {
    /* for blocks that should be hidden on small screen */
    .xs\:hidden {
        display: none;
    }
}

/* cursor for seat select "button" */
[data-seat-picker-map-target="seat"] {
    cursor: pointer;
}
[data-seat-picker-map-target="seat"].bg-gray-50 {
    cursor: default;
}

/* make kpn-pagination link full width */
.sortable-th a {
    flex-grow: 1;
    text-align: left;
}

/* spinner animation for loading states */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.spinner {
    animation: spin 1s linear infinite;
}

/* print booking */
@media print {
    body * {
        visibility: hidden;
    }
    #printableSection, #printableSection * {
        visibility: visible;
        color: black !important;
    }
    #printableSection {
        position: absolute;
        left: 0;
        top: 0;
        /* Rimuovi l'altezza fissa e imposta overflow */
        height: auto !important;
        overflow: visible !important;
    }
    /* Nascondi eventuali scrollbar */
    ::-webkit-scrollbar {
        display: none;
    }
    .hide-on-print {
        visibility: hidden;
        display: none;
    }
}


/* checkbox for ios-like toggle, svgs are used to display state */
.ios-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;

    input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

    .switch-visual {
        position: relative;
        width: 51px;
        height: 31px;

        svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transition: opacity 0.25s ease-in-out, transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
    }

    /* --- default (off) state --- */
    input[type="checkbox"] ~ .switch-visual .svg-off {
        opacity: 1;
    }
    input[type="checkbox"] ~ .switch-visual .svg-on {
        opacity: 0;
    }
    /* --- active (on) state --- */
    input[type="checkbox"]:checked ~ .switch-visual .svg-off {
        opacity: 0;
    }
    input[type="checkbox"]:checked ~ .switch-visual .svg-on {
        opacity: 1;
    }
    /* focus ring for accessibility navigation */
    input[type="checkbox"]:focus-visible ~ .switch-visual {
        outline: 2px solid #BD8252;
        outline-offset: 3px;
        border-radius: 16px;
    }
}