﻿/* CSS personalizzato per SegnalazioneEventi.aspx */

/* Stili generali */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

.container-fluid.form-eventi {
    max-width: 1200px;
    margin: 1rem auto 5rem;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Section titles */
.section-title {
    color: white;
    font-weight: 600;
    border-bottom: 3px solid #78C2AD;
    padding-bottom: 10px;
    margin-bottom: 0.7rem;
    position: relative;
}

    /*.section-title::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        width: 50px;
        height: 3px;
        background: linear-gradient(90deg, #5a6268 20%, var(--ld-primary) 100%);
    }*/

/* Header section */
.header-section {
    color: #F9F9F8;
    padding: 25px;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px -20px;
}

    .header-section h4 {
        color: #F9F9F8;
        font-weight: 600;
    }

    .header-section p {
        margin-bottom: 5px;
        opacity: 0.9;
    }

    .header-section a {
        text-decoration: none;
    }

/* Form controls styling */
.form-group label,
.form-group.dxeBase,
.form-check-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 16px;
}

.form-control,
.dxbs-editor-container,
.dxbs-textbox,
.dxbs-dateedit,
.dxbs-timeedit,
.dxbs-memo,
.dxbs-spinbox,
.dxbs-spin-edit {
    border-radius: 6px;
    /*border: 2px solid #e9ecef;*/
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus,
    .dxbs-editor-container.dxbs-state-focused,
    .dxbs-textbox.dxbs-state-focused,
    .dxbs-dateedit.dxbs-state-focused,
    .dxbs-timeedit.dxbs-state-focused,
    .dxbs-spinbox.dxbs-state-focused {
        border-color: #78C2AD;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .dxbs-memo .form-control {
        height: 100px
    }

.disabledDate {
    text-decoration: line-through red !important;
}

/* Risk calculation tables */
.risk-table {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 5px solid #78C2AD;
    position: relative;
    overflow: hidden;
}

    .risk-table::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 100px;
        height: 100px;
        background: rgba(0, 123, 255, 0.05);
        border-radius: 50%;
        transform: translate(50%, -50%);
    }

    .risk-table h5 {
        color: #78C2AD;
        font-weight: 700;
        margin-bottom: 20px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* Checkbox and radio button styling */
.checkbox-group {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    transition: box-shadow 0.15s ease-in-out;
}

    .checkbox-group:hover {
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .checkbox-group label {
        font-weight: 700;
        color: #343a40;
        margin-bottom: 10px;
        display: block;
        text-transform: uppercase;
        font-size: 0.9em;
        letter-spacing: 0.5px;
    }

    .checkbox-group .form-check .form-check-input {
        margin-top: 0.3rem;
    }

/* DevExpress control styling */
.dxeBase {
    font-size: 16px;
}

.dxbs-radiobutton,
.dxbs-checkbox,
.dxichCellSys {
    margin-bottom: 8px !important;
    padding: 0 0 3px 0 !important;
}

.dxbs-radiobutton-text,
.dxbs-checkbox-text,
.dxichTextCellSys {
    font-size: 0.95em;
    color: #495057;
    padding-left: 8px;
}

.dxbs-radiobutton.dxbs-state-focused,
.dxbs-checkbox.dxbs-state-focused {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
}

.form-check .form-check-input {
    margin-top: 0.4rem;
}

.form-check-input.is-invalid ~ .form-check-label span,
.dxbs-edit-error-text.invalid-feedback span {
    color: #ff7851 !important;
}

/* Score display */
.score-display {
    /*background: linear-gradient(135deg, #28a745 0%, #20c997 100%);*/
    color: var(--ld-dark);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.3em;
    /*box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);*/
    /*margin-bottom: 20px;*/
}

    .score-display .row {
        align-items: center;
    }

    .score-display label {
        color: var(--ld-dark);
        font-weight: 600;
        margin-bottom: 5px;
        display: block;
    }

/* Event type grid */
.event-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

    .event-type-grid span {
        font-weight: 600;
        margin-bottom: 8px;
    }

        .event-type-grid span:not(.invalid-feedback) {
            color: #495057;
        }

/* Alert styling for risk levels */
.info-rischio,
.alert {
    color: var(--ld-dark);
    border-radius: 8px;
    padding: 20px;
    font-size: 0.95em;
    margin-bottom: 20px;
}

    .info-rischio h6 {
        font-weight: 700;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-rischio ul {
        margin-left: 20px;
    }

    .info-rischio li {
        margin-bottom: 8px;
        padding-left: 5px;
    }

        .info-rischio li strong {
            color: #495057;
        }

/* Button styling */
.btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.btn-primary {
    box-shadow: 0 4px 15px rgba(0, 123, 138, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 123, 138, 0.4);
    }

.btn-success {
    background: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

    .btn-success:hover {
        background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    }

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

    .btn-secondary:hover {
        background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    }

    .btn-secondary.dropdown-toggle,
    .upload-button {
        padding: 0 15px;
        border-radius: 6px;
    }

        .btn-secondary.dropdown-toggle::after {
            vertical-align: 0;
        }

.btn.btn-arrow {
    position: relative;
    padding-right: 2.4rem; /* space for the arrow */
    overflow: visible;
    /* optional visual tweaks */
    display: inline-flex;
    align-items: center;
}

    /* the arrow */
    .btn.btn-arrow::after {
        content: '➜'; /* change to ➜ or → or any char */
        position: absolute;
        right: 1.2rem;
        top: 50%;
        transform: translateY(-50%) translateX(0);
        font-size: 1.05em;
        line-height: 1;
        transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms;
        opacity: 0.9;
        will-change: transform;
    }

    /* on hover/focus the arrow slides right */
    .btn.btn-arrow:hover::after,
    .btn.btn-arrow:focus::after,
    .btn.btn-arrow.dxbButtonHover::after { /* devexpress focused state name included */
        transform: translateY(-50%) translateX(6px);
    }

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .btn.btn-arrow::after {
        transition: none;
    }
}

.btn-conferma {
    min-width: 200px;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-conferma:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

/* Risk level color coding */
.text-success {
    color: #28a745 !important;
    font-weight: 700;
}

.text-warning {
    color: #F4D35E !important;
    font-weight: 700;
}

.text-danger {
    color: #ff7851 !important;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
        margin: 10px;
    }

    .header-section {
        padding: 20px;
        margin: -15px -15px 25px -15px;
    }

    .risk-table {
        padding: 20px;
    }

    .event-type-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .score-display {
        font-size: 1.1em;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .header-section h4 {
        font-size: 1.3em;
    }

    .section-title {
        font-size: 1.2em;
    }

    .checkbox-group {
        padding: 10px;
    }

    .risk-table {
        padding: 15px;
    }
}

/* Animation for form elements */
.form-group {
    /*animation: fadeInUp 0.6s ease-out;*/
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
    }

    .loading::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 40px;
        height: 40px;
        border: 4px solid #f3f3f3;
        border-top: 4px solid #78C2AD;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        z-index: 1001;
        transform: translate(-50%, -50%);
    }

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Custom DevExpress theme adjustments */
.dxbs-widget {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dxbs-button,
.dxbButton {
    border-radius: 25px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

    .dxbs-button.dxbs-state-hover,
    .dxbButton.dxbButtonHover {
        transform: translateY(-1px) !important;
    }

/* Signature section styling */
.signature-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #F4D35E;
    margin-top: 30px;
}

/* Print styles */
@media print {
    .btn,
    .header-section,
    .alert {
        display: none !important;
    }

    .container-fluid {
        box-shadow: none;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .risk-table {
        background: white !important;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .section-title {
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
    }

    .score-display {
        background: white !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}
