/* Main styles for the blockchain explorer */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Simple alternating row colors */
tr.table-row-even {
    background-color: #ffffff !important;
}

tr.table-row-odd {
    background-color: #f6f6f6 !important;
}

/* Ensure alternating colors apply to the cells */
tr.table-row-even td {
    background-color: transparent !important;
}

tr.table-row-odd td {
    background-color: transparent !important;
}

/* Remove transition effects on rows */
.block-row {
    position: relative;
    border-bottom: 1px solid #e9ecef;
    transition: none;
}

/* Remove transition effect from all buttons */
.btn, .btn-outline-light, .page-link, .block-card {
    transition: none;
}

/* The details row should always have a light background */
.collapse.show {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef;
}

/* Add a subtle border between rows for better separation */
.block-row {
    border-bottom: 1px solid #e9ecef;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.navbar {
    margin-bottom: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
}

.navbar-brand {
    font-size: 1.35rem;
    letter-spacing: 0.5px;
}

/* Search input styling */
.form-control {
    min-width: 250px;
    border-radius: 4px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light {
    border-radius: 4px;
    transition: none;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    flex: 1 0 auto;
}

.row {
    margin: 0;
    width: 100%;
}

.card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    border: none;
}

.card-header {
    padding: 0.75rem 1rem;
    border-bottom: none;
    background-color: #0d6efd;
}

.card-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#blockchain-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.table-responsive {
    flex: 1;
    overflow: auto;
}

.table {
    background-color: white;
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 0.75rem 1rem;
    z-index: 10;
}

/* Remove any background from the table cells to let row background show through */
.table td {
    vertical-align: middle;
    padding: 0;
    border-top: 1px solid #dee2e6;
    background-color: transparent !important;
}

.block-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.expand-indicator {
    transition: none;
    color: #6c757d;
}

.bi-chevron-down, .bi-chevron-right {
    transform: none;
    transition: none;
}

/* Pagination styles */
.pagination {
    margin: 0;
    padding: 0.5rem 0;
}

.page-link {
    color: #000000;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: none;
}

.page-item.active .page-link {
    background-color: transparent !important;
    color: #000000;
    font-weight: bold;
    border: 1px solid #000000;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: transparent !important;
}

.collapse {
    background-color: #f8f9fa;
}

.collapse .card {
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.collapse .card-body {
    padding: 1rem;
}

.collapse.show {
    background-color: #f8f9fa;
}

.text-break {
    word-break: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
}

.verify-signature-btn {
    min-width: 80px;
}

/* Block card styles */
.block-card {
    transition: all 0.3s ease;
    border-left: 5px solid #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.current-hash, .prev-hash {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #495057;
    word-break: break-all;
}

.block-data {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    max-height: 300px; /* Increased to accommodate more data */
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

/* Style for signing address and signature */
.block-data strong {
    color: #0056b3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
}

.block-data .mb-3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.block-data .mb-3:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.additional-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Connecting lines between blocks */
.block-connection {
    width: 2px;
    background-color: #000000;
    margin: 0 auto;
    height: 30px;
    position: relative;
}

/* Arrow pointing upwards (rotated 180 degrees) */
.block-connection:before {
    content: "";
    position: absolute;
    top: -8px; /* Position it just above the line */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #000000; /* This creates an upward-pointing triangle */
}

.block-row td {
    padding: 1rem;
}

.collapse .card-title {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.collapse p {
    margin-bottom: 0.5rem;
}

.collapse strong {
    color: #495057;
    font-weight: 600;
}

/* Badge styles */
.badge.bg-secondary {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Card styling in details */
.collapse .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Styling for the raw data section */
pre code {
    display: block;
    background-color: #f8f9fa;
    color: #212529;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Style for the expanded details row */
.details-row.show {
    background-color: #ffffff !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #dee2e6;
}

/* Make the card in the details section more visually appealing */
.details-row .card {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Override for details row card header */
.details-row .card-header {
    background-color: #cacaca !important;
    border-bottom: 1px solid #e3eeff;
    color: #0d6efd;
    padding: 0.75rem 1rem;
}

/* Button and interactive element styling - no hover effects */
.btn, 
.btn-primary, 
.btn-secondary, 
.btn-success,
.btn-outline-light {
    transition: none !important;
    background-image: none !important;
    box-shadow: none !important;
}

.search-input:focus {
    border-color: #80bdff;
    box-shadow: none !important;
    color: #000000 !important;
    background-color: #ffffff !important;
} 

.search-input {
    border: 1px solid #ced4da;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #000000 !important;
    font-weight: 500;
    height: 46px;
    background-color: #ffffff;
}

.search-input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    color: #000000 !important;
    background-color: #ffffff;
}

.search-input::placeholder {
    color: #8a8a8a;
    opacity: 0.8;
}