/* Styles d'administration pour le plugin ESI Peppol */

.esi-peppol-settings-wrap {
    max-width: 900px;
}

.esi-peppol-settings-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    padding: 24px 28px;
    margin-top: 20px;
}

.esi-peppol-settings-card h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.esi-peppol-settings-card .form-table th {
    width: 220px;
}

.esi-peppol-settings-card .form-table td input.regular-text {
    max-width: 420px;
}

.esi-peppol-password-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esi-peppol-password-wrapper .regular-text {
    flex: 1 1 auto;
}

#esi-peppol-test-result {
    margin-top: 15px;
}

#esi-peppol-test-result .notice {
    padding: 8px 12px;
}

/* Styles pour le logo email */
.esi-peppol-logo-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    max-width: 300px;
}

.esi-peppol-logo-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

#esi-peppol-remove-logo {
    margin-left: 8px;
}

/* Styles pour les statuts dans les logs */
.statut {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
}

/* Couleurs par défaut pour les statuts communs */
.statut-success,
.statut-succès,
.statut-completed,
.statut-complété,
.statut-ok,
.statut-created {
    background-color: #10b981;
    color: #ffffff;
}

.statut-error,
.statut-erreur,
.statut-failed,
.statut-échec {
    background-color: #ef4444;
    color: #ffffff;
}

.statut-pending,
.statut-en-attente,
.statut-waiting,
.statut-en-cours {
    background-color: #f59e0b;
    color: #ffffff;
}

.statut-processing,
.statut-traitement,
.statut-sent,
.statut-envoyé {
    background-color: #3b82f6;
    color: #ffffff;
}

/* Statut par défaut pour les valeurs non reconnues */
.statut-default {
    background-color: #6b7280;
    color: #ffffff;
}

/* Styles pour la modal de détails des logs */
.esi-peppol-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esi-peppol-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.esi-peppol-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    max-height: 90vh;
    width: 800px;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.esi-peppol-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #ddd;
}

.esi-peppol-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.esi-peppol-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
}

.esi-peppol-modal-close:hover {
    color: #000;
}

.esi-peppol-modal-close .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.esi-peppol-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.esi-peppol-loading {
    text-align: center;
    padding: 40px 20px;
}

.esi-peppol-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

.esi-peppol-log-details-section {
    margin-bottom: 30px;
}

.esi-peppol-log-details-section:last-child {
    margin-bottom: 0;
}

.esi-peppol-log-details-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 8px;
}

.esi-peppol-log-details-section table {
    margin: 0;
}

.esi-peppol-log-details-section table th {
    background-color: #f6f7f7;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

.esi-peppol-log-details-section table td {
    padding: 12px;
    vertical-align: top;
}

.esi-peppol-log-json {
    background-color: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.esi-peppol-error {
    color: #d63638;
    padding: 15px;
    background-color: #fcf0f1;
    border-left: 4px solid #d63638;
    margin: 0;
}
