/* Gestione Sinistri - Frontend Styles - WE LOVE YOUR BIKE Theme */

/* === VARIABILI COLORI === */
:root {
    --primary-red: #D32F2F;
    --dark-red: #B71C1C;
    --black: #1A1A1A;
    --gray-dark: #4A4A4A;
    --gray-medium: #757575;
    --gray-light: #E0E0E0;
    --white: #FFFFFF;
    --success-green: #388E3C;
    --warning-orange: #F57C00;
    --gray-step-bg: #E0E0E0;
}

/* === GENERALE === */
* {
    box-sizing: border-box;
}

/* === PULSANTE APRI SINISTRO === */
.gs-open-button {
    display: inline-block;
    padding: 20px 40px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.4);
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.gs-open-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(211, 47, 47, 0.5);
    color: var(--white);
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
}

/* === FORM SINISTRO === */
.gs-form-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.gs-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(26, 26, 26, 0.1);
    border-top: 5px solid var(--primary-red);
}

.gs-form h2 {
    margin-bottom: 10px;
    color: var(--black);
    font-size: 32px;
}

.gs-form-description {
    color: var(--gray-dark);
    margin-bottom: 30px;
    font-size: 16px;
}

.gs-form-step {
    display: none;
    min-height: 400px;
}

.gs-form-step.gs-step-active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gs-form-step h3 {
    margin-bottom: 30px;
    color: var(--black);
    font-size: 24px;
    border-bottom: 3px solid var(--primary-red);
    padding-bottom: 15px;
}

.gs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .gs-form-row {
        grid-template-columns: 1fr;
    }
    
    .gs-form-container {
        padding: 25px;
    }
    
    .gs-progress-bar {
        flex-wrap: wrap;
    }
}

.gs-form-field {
    margin-bottom: 25px;
}

.gs-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--black);
    font-size: 14px;
}

.gs-form-field input[type="text"],
.gs-form-field input[type="email"],
.gs-form-field input[type="tel"],
.gs-form-field input[type="date"],
.gs-form-field input[type="file"],
.gs-form-field select,
.gs-form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--black);
}

.gs-form-field input:focus,
.gs-form-field select:focus,
.gs-form-field textarea:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.gs-form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.gs-form-field small {
    display: block;
    margin-top: 5px;
    color: var(--gray-medium);
    font-size: 13px;
}

.gs-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

.gs-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.gs-btn-next,
.gs-btn-submit {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    margin-left: auto;
}

.gs-btn-next:hover,
.gs-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
}

.gs-btn-prev {
    background: var(--gray-light);
    color: var(--black);
}

.gs-btn-prev:hover {
    background: var(--gray-dark);
    color: var(--white);
}

.gs-btn-primary {
    background: var(--primary-red);
    color: var(--white);
}

.gs-btn-primary:hover {
    background: var(--dark-red);
}

.gs-btn-secondary {
    background: var(--gray-dark);
    color: var(--white);
}

.gs-btn-secondary:hover {
    background: var(--black);
}

.gs-btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* === PROGRESS BAR === */
.gs-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-light);
}

.gs-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.gs-progress-step.gs-step-active {
    opacity: 1;
}

.gs-progress-step::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 50%;
    width: 90%;
    height: 3px;
    background: var(--gray-light);
    z-index: 0;
}

.gs-progress-step:first-child::before {
    display: none;
}

.gs-progress-step.gs-step-active::before {
    background: var(--primary-red);
}

.gs-step-number {
    width: 40px;
    height: 40px;
    background: #E0E0E0;
    color: var(--gray-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 10px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.gs-progress-step.gs-step-active .gs-step-number {
    background: var(--primary-red);
    color: var(--white);
    transform: scale(1.1);
}

.gs-step-label {
    font-size: 13px;
    text-align: center;
    color: var(--gray-dark);
}

.gs-progress-step.gs-step-active .gs-step-label {
    color: var(--black);
    font-weight: 600;
}

/* === LOADING === */
.gs-form-loading {
    text-align: center;
    padding: 40px 0;
}

.gs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === MESSAGES === */
.gs-form-messages {
    margin-top: 20px;
}

.gs-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.gs-alert-success {
    background: #E8F5E9;
    color: #1B5E20;
    border-left: 4px solid var(--success-green);
}

.gs-alert-error {
    background: #FFEBEE;
    color: #B71C1C;
    border-left: 4px solid var(--primary-red);
}

/* === AREA PERSONALE === */
.gs-login-wrapper {
    max-width: 450px;
    margin: 60px auto;
    padding: 20px;
}

.gs-login-container {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(26, 26, 26, 0.1);
    border-top: 5px solid var(--primary-red);
}

.gs-login-container h2 {
    margin-bottom: 30px;
    color: var(--black);
    text-align: center;
}

.gs-login-form {
    margin-top: 30px;
}

.gs-login-links {
    text-align: center;
    margin-top: 20px;
}

.gs-login-links a {
    color: var(--primary-red);
    text-decoration: none;
}

.gs-login-links a:hover {
    text-decoration: underline;
}

.gs-user-area-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.gs-user-area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-light);
}

.gs-user-area-header h2 {
    margin: 0;
    color: var(--black);
}

.gs-no-sinistri {
    text-align: center;
    padding: 60px 20px;
    background: #F5F5F5;
    border-radius: 10px;
    border: 2px dashed var(--gray-light);
}

.gs-no-sinistri p {
    font-size: 18px;
    color: var(--gray-dark);
    margin-bottom: 30px;
}

.gs-sinistri-list {
    display: grid;
    gap: 25px;
}

.gs-sinistro-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(26, 26, 26, 0.08);
    transition: all 0.3s ease;
    border-left: 5px solid var(--primary-red);
}

.gs-sinistro-card:hover {
    box-shadow: 0 5px 25px rgba(26, 26, 26, 0.12);
    transform: translateY(-3px);
}

.gs-sinistro-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.gs-sinistro-title h4 {
    margin: 0 0 5px 0;
    color: var(--black);
    font-size: 20px;
}

.gs-sinistro-date {
    color: var(--gray-medium);
    font-size: 14px;
}

.gs-sinistro-status {
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
}

.gs-sinistro-info {
    margin: 20px 0;
    padding: 20px;
    background: #F5F5F5;
    border-radius: 8px;
}

.gs-sinistro-info p {
    margin: 8px 0;
    color: var(--black);
}

.gs-sinistro-progress {
    margin: 25px 0;
}

.gs-sinistro-progress h5 {
    margin-bottom: 15px;
    color: var(--black);
    font-size: 16px;
}

.gs-progress-tracker {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 20px 0;
}

.gs-progress-tracker::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gray-light);
    z-index: 0;
}

.gs-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.gs-progress-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-light);
    margin-bottom: 10px;
    transition: all 0.3s;
}

.gs-progress-item.completed .gs-progress-dot {
    background: var(--success-green);
}

.gs-progress-item.current .gs-progress-dot {
    background: var(--primary-red);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.2);
}

.gs-progress-label {
    font-size: 12px;
    text-align: center;
    color: var(--gray-medium);
    max-width: 100px;
}

.gs-progress-item.completed .gs-progress-label,
.gs-progress-item.current .gs-progress-label {
    color: var(--black);
    font-weight: 600;
}

.gs-sinistro-description {
    margin: 20px 0;
    padding: 15px;
    background: #FFF3E0;
    border-left: 4px solid var(--warning-orange);
    border-radius: 4px;
}

.gs-sinistro-description p {
    margin: 0;
    color: var(--black);
}

.gs-sinistro-actions {
    margin-top: 20px;
    text-align: right;
}

/* === MODAL === */
.gs-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.gs-modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 15px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s;
    box-shadow: 0 10px 40px rgba(26, 26, 26, 0.3);
    border-top: 5px solid var(--primary-red);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gs-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--gray-medium);
    cursor: pointer;
    transition: color 0.3s;
}

.gs-modal-close:hover {
    color: var(--primary-red);
}

.gs-loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-dark);
}

/* === FILES PREVIEW === */
#gs-files-preview {
    margin-top: 15px;
}

.gs-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #F5F5F5;
    border-radius: 5px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary-red);
}

.gs-file-item span {
    flex: 1;
    margin-right: 10px;
    color: var(--black);
}

.gs-file-remove {
    color: var(--primary-red);
    cursor: pointer;
    font-weight: bold;
}

.gs-file-remove:hover {
    color: var(--dark-red);
}

/* === DOCUMENT INSTRUCTIONS === */
.gs-document-instructions {
    background: #f0f9ff;
    border-left: 4px solid var(--primary-red);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.gs-document-instructions p {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 15px;
    font-size: 16px;
}

.gs-document-instructions ul {
    list-style: none;
    padding-left: 0;
}

.gs-document-instructions ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--gray-dark);
    font-size: 15px;
}

.gs-document-instructions ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
    font-size: 18px;
}

/* === ERROR STYLING === */
.gs-form-field input.error,
.gs-form-field select.error,
.gs-form-field textarea.error {
    border-color: var(--primary-red);
}

.error-message {
    color: var(--primary-red);
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* === PAGINA RINGRAZIAMENTO === */
.gs-thanks-wrapper {
    max-width: 700px;
    margin: 60px auto;
    padding: 20px;
}

.gs-thanks-container {
    background: var(--white);
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(26, 26, 26, 0.1);
    border-top: 5px solid var(--primary-red);
    text-align: center;
}

.gs-thanks-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: scaleIn 0.5s ease;
}

.gs-thanks-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--white);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.gs-thanks-container h1 {
    color: var(--black);
    font-size: 32px;
    margin-bottom: 20px;
}

.gs-thanks-container p {
    color: var(--gray-dark);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.gs-thanks-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* === MESSAGGI CLIENTE === */
.gs-cliente-messaggio {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 10%, #f093fb 100%);
    border-radius: 12px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideInMessage 0.6s ease;
}

.gs-messaggio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gs-messaggio-header strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.gs-messaggio-data {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.gs-messaggio-content {
    color: var(--white);
    font-size: 15px;
    line-height: 1.7;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === UPLOAD DOCUMENTI === */
.gs-upload-documenti {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
}

.gs-upload-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.gs-upload-header strong {
    font-size: 18px;
    color: var(--black);
}

.gs-upload-form .gs-form-field {
    margin-bottom: 20px;
}

.gs-upload-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--black);
}

.gs-file-input {
    width: 100%;
    padding: 15px;
    border: 2px dashed var(--primary-red);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gs-file-input:hover {
    border-color: var(--dark-red);
    background: #fff5f5;
}

.gs-files-preview {
    margin: 15px 0;
}

.gs-file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 10px;
}

.gs-file-preview-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--black);
}

.gs-file-preview-remove {
    color: var(--primary-red);
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s;
}

.gs-file-preview-remove:hover {
    transform: scale(1.2);
}

.gs-upload-btn {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gs-upload-icon {
    font-size: 20px;
}

.gs-upload-loading {
    text-align: center;
    padding: 30px;
}

.gs-upload-loading .gs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.gs-upload-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.gs-upload-message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.gs-upload-message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.gs-upload-done {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 10px;
}

.gs-check-icon {
    font-size: 50px;
    display: block;
    margin-bottom: 15px;
}

.gs-upload-done p {
    font-size: 16px;
    font-weight: 600;
    color: #065f46;
    margin: 10px 0;
}

.gs-upload-done small {
    color: #047857;
    font-size: 13px;
}
