/* Stili per Yacht Claims Manager PRO Extended - Design Moderno a Card */

/* Contenitore principale */
.ycmp-history-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: #343a40;
}

.ycmp-history-container h2 {
    text-align: center;
    color: #1a237e;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.ycmp-history-container h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* Messaggio "Nessuna richiesta" */
.ycmp-no-claims {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: none;
    margin-top: 30px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #495057;
}

.ycmp-no-claims p {
    margin-bottom: 15px;
}

.ycmp-no-claims a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.ycmp-no-claims a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Stili per i pulsanti */
.ycmp-no-claims a.button,
.ycmp-no-claims .button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}

.ycmp-no-claims a.button:hover,
.ycmp-no-claims .button:hover {
    background-color: #0056b3;
}

/* Contenitore delle card - Usa Grid per il layout */
.ycmp-claims-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 1 colonna su mobile, 2+ su schermi più grandi */
    gap: 25px; /* Spazio tra le card */
    margin-top: 30px;
}

/* Stile per ogni singola card */
.ycmp-claim-card {
    background-color: #fefefe;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ycmp-claim-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.ycmp-card-header {
    background-color: #f0f4f8; /* Sfondo header card */
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
}

.ycmp-card-id {
    color: #1a237e; /* Colore per l'ID */
    font-size: 1.1em;
    font-weight: 700;
}

.ycmp-card-date {
    font-size: 0.9em;
    color: #777;
}

.ycmp-card-body {
    padding: 20px;
    flex-grow: 1; /* Permette al body di espandersi */
}

.ycmp-card-body p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 0.95em;
}

.ycmp-card-body p strong {
    color: #333;
    font-weight: 600;
    margin-right: 5px;
}

.ycmp-card-body p:last-child {
    margin-bottom: 0;
}

/* Stili per tipi di richiesta e stato (badge) */
.ycmp-claim-type, .ycmp-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px; /* Angoli più arrotondati per i badge */
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 5px;
    white-space: nowrap;
}

/* Colori per i badge (mantenuti per consistenza) */
.ycmp-type-electrical { background-color: #e0f2f7; color: #007bff; }
.ycmp-type-navigation { background-color: #e3f2fd; color: #1a237e; }
.ycmp-type-monitoring { background-color: #ede7f6; color: #673ab7; }
.ycmp-type-other { background-color: #f1f8e9; color: #689f38; }

.ycmp-status-pending { background-color: #fff3e0; color: #ff9800; }
.ycmp-status-processing { background-color: #e3f2fd; color: #2196f3; }
.ycmp-status-resolved { background-color: #e8f5e9; color: #4caf50; }
.ycmp-status-closed { background-color: #ffebee; color: #f44336; }

/* Stili per allegati */
.ycmp-card-attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.9em;
}

.ycmp-card-attachments a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    word-break: break-all; /* Per evitare overflow di nomi file lunghi */
}

.ycmp-card-attachments a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.ycmp-card-attachments strong {
    display: block;
    margin-bottom: 5px;
}

.ycmp-card-notes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    font-size: 0.9em;
    color: #555;
    background-color: #fafafa;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f0f0f0;
}

.ycmp-card-notes strong {
    color: #333;
    margin-bottom: 5px;
}


/* Media Queries per la responsività */
@media (max-width: 768px) {
    .ycmp-history-container {
        margin: 20px 15px;
        padding: 20px;
    }
    .ycmp-history-container h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .ycmp-claims-list {
        grid-template-columns: 1fr; /* Una colonna su schermi piccoli */
        gap: 20px;
    }
    .ycmp-claim-card {
        padding: 0; /* Rimuovi padding sulla card per gestire meglio gli spazi interni */
    }
    .ycmp-card-header {
        padding: 12px 18px;
    }
    .ycmp-card-body {
        padding: 18px;
    }
    .ycmp-card-body p {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .ycmp-history-container h2 {
        font-size: 1.8em;
    }
    .ycmp-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .ycmp-card-id {
        font-size: 1em;
    }
    .ycmp-card-date {
        font-size: 0.85em;
    }
}