/* Conteneur principal pour l'explorer */
.explorer {
    max-width: 1200px;
    width: calc(100% - 20px);
    margin: 10px auto;
    box-sizing: border-box;
}

/* Boîte principale de l'explorer */
.explorer .explorer-box {
    border: 1px solid #636e72;
    border-radius: 8px;
    background-color: #353b48;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: block;
}

/* Titre de l'explorer */
.explorer .explorer-title {
    padding: 12px;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    background-color: #2d3436;
    border-radius: 8px 8px 0 0;
}

/* Conteneur interne de l'explorer */
.explorer .explorer-inner {
    padding: 12px;
    color: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

/* Tableaux de l'explorer */
.explorer .explorer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.explorer .explorer-table th,
.explorer .explorer-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #636e72;
    color: #ffffff;
    font-size: 8pt;
    white-space: nowrap;
}

.explorer .explorer-table th {
    background-color: #2d3436;
    font-weight: bold;
    box-shadow: 2px 2px 2px #c0c0c0, -1px -1px 2px white;
}

.explorer .explorer-table a,
.explorer .explorer-table a:visited {
    color: #e17055;
    text-decoration: none;
}

.explorer .explorer-table a:hover {
    text-decoration: underline;
}

/* Ajustement des largeurs pour la table des transactions */
.explorer .explorer-table.transactions-table th:nth-child(1),
.explorer .explorer-table.transactions-table td:nth-child(1) {
    width: 5%;
}

.explorer .explorer-table.transactions-table th:nth-child(2),
.explorer .explorer-table.transactions-table td:nth-child(2) {
    width: 40%;
}

.explorer .explorer-table.transactions-table th:nth-child(3),
.explorer .explorer-table.transactions-table td:nth-child(3) {
    width: 10%;
}

.explorer .explorer-table.transactions-table th:nth-child(4),
.explorer .explorer-table.transactions-table td:nth-child(4) {
    width: 15%;
}

.explorer .explorer-table.transactions-table th:nth-child(5),
.explorer .explorer-table.transactions-table td:nth-child(5) {
    width: 15%;
}

.explorer .explorer-table.transactions-table th:nth-child(6),
.explorer .explorer-table.transactions-table td:nth-child(6) {
    width: 15%;
    white-space: normal;
    font-size: 7pt;
    line-height: 1.3;
}

/* Effet de survol sur les lignes */
.explorer .explorer-row:hover {
    background-color: #4b5463;
}

/* Style pour texte monospace */
.explorer .monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 8pt;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
}

/* Pagination */
.explorer .explorer-pager {
    float: right;
    width: 200px;
    text-align: right;
    margin: 8px 16px 0 0;
}

.explorer .explorer-pager a,
.explorer .explorer-pager a:visited {
    margin: 0 5px;
    color: #dfe6e9;
    text-decoration: none;
}

.explorer .explorer-pager a:hover {
    color: #e17055;
    text-decoration: underline;
}

/* Formulaire de recherche */
.explorer .explorer-form {
    margin: 20px 0;
    overflow: hidden;
    /* display: flex; supprimé pour forcer une seule ligne */
    align-items: center;
}

/* Champ de saisie */
.explorer .main-text-input {
    width: 100%;
    max-width: 600px; /* Zone de recherche plus large */
    padding: 8px;
    border: 1px solid #636e72;
    border-radius: 4px 0 0 4px;
    background-color: #2d3436;
    color: #ffffff;
    margin: 0;
    font-size: 9pt;
    display: inline-block; /* Assure un affichage en ligne */
}

/* Bouton de recherche */
.explorer .main-submit-button {
    padding: 8px 12px;
    background-color: #e17055;
    border: none;
    border-radius: 0 4px 4px 0;
    color: #ffffff;
    cursor: pointer;
    font-size: 9pt;
    width: auto;
    max-width: 100px;
    white-space: nowrap;
    margin-left: -1px; /* Colle le bouton au champ */
    display: inline-block; /* Assure un affichage en ligne */
}

.explorer .main-submit-button:hover {
    background-color: #d65d44;
}

/* Graphique */
.explorer .explorer-graph {
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
    height: 300px !important;
    max-height: 300px !important;
    overflow: hidden;
}

.explorer #difficultyChart {
    width: 100% !important;
    max-width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    display: block;
    box-sizing: border-box;
}

/* JSON container */
.explorer .json-container {
    display: none;
    margin-top: 10px;
    padding: 12px;
    background-color: #1e2527;
    border: 1px solid #636e72;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #ffffff;
}

.explorer .json-container pre {
    margin: 0;
    white-space: pre-wrap;
    color: #ffffff !important;
}

.explorer .json-key {
    color: #55e6a0;
    font-weight: bold;
}

.explorer .json-string {
    color: #e17055;
}

.explorer .json-number {
    color: #0984e3;
}

.explorer .json-timestamp {
    color: #6c5ce7;
}

.explorer .json-boolean {
    color: #f1c40f;
}

.explorer .json-bracket {
    color: #b2bec3;
}

/* Styles pour toggle-json */
.explorer .toggle-json {
    cursor: pointer;
    color: #e17055;
    text-decoration: underline;
    margin-bottom: 10px;
    display: inline-block;
}

.explorer .toggle-json.active {
    color: #d65d44;
    text-decoration: none;
}

/* Assurez-vous que .monospace l'emporte pour la taille de la police et supprime ellipsis pour les hashes */
.explorer .monospace.toggle-json {
    font-size: 8pt; /* Correspond à .monospace */
    text-overflow: clip; /* Supprime les points de suspension */
    overflow: visible; /* Permet au texte de dépasser si nécessaire */
    white-space: normal; /* Permet au texte de s'envelopper si nécessaire */
    max-width: none; /* Supprime la limite de largeur */
}

/* Section pour les conteneurs JSON */
.explorer .json-container-section {
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.explorer .back-button {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 16px;
    background-color: #636e72;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
}

.explorer .back-button:hover {
    background-color: #555e66;
}

.explorer .segwit-icon {
    vertical-align: middle;
    margin-left: 5px;
}

.explorer .type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #ffffff;
    max-width: 80px;
    text-align: center;
    line-height: 1.2;
}

.explorer .type-pow {
    background-color: #0984e3;
}

.explorer .type-pos {
    background-color: #2ecc71;
}

.explorer .type-auxpow {
    background-color: #f1c40f;
}

/* Bouton primaire */
.explorer .btn-primary {
    background-color: #e17055;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    color: #ffffff;
}

.explorer .btn-primary:hover {
    background-color: #d65d44;
}

/* Styles pour table rayée */
.explorer .table-striped tr:nth-child(even) {
    background-color: #4b5463;
}

.explorer .table-striped tr:nth-child(odd) {
    background-color: #353b48;
}

/* Styles pour table d'informations sur la monnaie */
.explorer .coin-info-table th {
    text-align: center;
}

/* Titre des transactions */
.explorer .transactions-title {
    color: #ffffff;
    margin: 20px 0 10px;
    font-size: 1.2em;
}

/* Limite de transactions */
.explorer .transactions-limit {
    text-align: center;
}

/* Ligne JSON cachée */
.explorer .json-row {
    display: none;
}

.explorer .zoom-wrapper-info-coin span.zoom-highlight-info-coin {
    animation: zoom 0.5s;
}

@keyframes zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Styles pour mobile */
@media (max-width: 576px) {
    .explorer .coin-info-table th .coin-name { display: none; }
    .explorer .coin-info-table th .coin-symbol::before { content: 'Coin Information: '; }
    .explorer .coin-info-table th .coin-symbol::after { content: ''; }
    .explorer #execute-payout { font-size: 8px; padding: 2px 4px; position: absolute; right: 12px; top: 10px; }
    .explorer #execute-payout .fa-money-bill-wave { display: none; }
    .explorer .explorer-graph, .explorer #difficultyChart {
        height: 200px !important;
        max-height: 200px !important;
    }
    .explorer .monospace {
        text-overflow: ellipsis;
        overflow: hidden;
        max-width: 100%;
        font-size: 7pt;
    }
    .explorer .monospace.toggle-json {
        font-size: 7pt; /* Correspond à .monospace sur mobile */
        text-overflow: clip; /* Supprime les points de suspension */
        overflow: visible; /* Permet au texte de dépasser si nécessaire */
        white-space: normal; /* Permet au texte de s'envelopper si nécessaire */
        max-width: none; /* Supprime la limite de largeur */
    }
    .explorer .explorer-table.transactions-table td:nth-child(6) {
        white-space: normal;
        font-size: 6pt;
        line-height: 1.3;
    }
    .explorer .main-text-input {
        width: 100%;
        max-width: 100%;
        padding: 6px;
        border-radius: 4px 0 0 4px;
        font-size: 8pt;
        margin: 0;
        display: inline-block;
    }
    .explorer .main-submit-button {
        padding: 6px 8px;
        font-size: 8pt;
        max-width: 80px;
        border-radius: 0 4px 4px 0;
        margin-left: -1px;
        display: inline-block;
    }
    .explorer .type-badge {
        max-width: 60px;
        font-size: 10px;
        padding: 3px 6px;
    }
    .explorer .json-container-section {
        margin-top: 15px;
    }
}