* {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 7px;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: rgba(0, 0, 0, .5);
    box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header_anchor{
    text-decoration: none;
}

#header {
    position: sticky;
    top: 0;
    background-color: #00bceb; /* Webex blue */
    color: white;
    padding: 20px;
    margin: 0;
    text-align: left; /* Align the title text to the left */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    z-index: 1000; /* Ensure the header is above other content */
}

#body {
    flex: 1;
    padding: 20px;
}

#footer {
    background-color: #f5f5f5;
    text-align: center;
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
}

#footer a {
    color: #00bceb; /* Webex blue */
    text-decoration: none;
    font-weight: bold;
}

#footer a:hover {
    text-decoration: underline;
}

/* Rest of the CSS for form and results remains the same */

form#search-form {
    padding: 10px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

input[type="text"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    background-color: #00bceb; /* Webex blue */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0099ba; /* Darker Webex blue */
}

table {
    width: 100%;
    border-collapse: collapse;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
}

.search-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: auto;
    width: 100%;
    padding: 20px; /* Add padding for spacing */
    box-sizing: border-box; /* Include padding in the width calculation */
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-group {
    flex: 1 1 25%; /* Each form group will take up half the width of the form-row */
    padding: 0 10px;
    box-sizing: border-box;
}

.full-width {
    margin: 0 10px; /* Add margin to maintain spacing */
}

.results-container {
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: auto;
    margin-top: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .form-group {
        flex: 1 1 100%; /* Each form group will take up the full width on smaller screens */
        padding: 0 10px; /* Adjust padding for smaller screens */
    }
}

.changelog-item {
    padding-bottom: 20px;
    margin-bottom: 20px; /* Space between changelog items */
    border-bottom: 3px solid #e4e5e6;
}

.changelog-item h2, .changelog-item h3 {
    color: #333;
    margin-bottom: 10px;
}

.changelog-item .commits{
    margin-top: 20px;
    margin-bottom: 20px;
}

.changelog-item .commits ul {
    margin-top: 10px;
    list-style-type: none;
    padding: 0;
    max-height: 200px;
    overflow: scroll;
}

.changelog-item .commits ul li {
    background-color: #eee;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 3px;
    word-wrap: break-word;
}

.changelog-item .commit-hash {
    font-family: monospace;
}

.changelog-item .related-packages{
    position: relative;
}

.changelog-item .related-packages .table-wrapper{
    max-height: 200px;
    overflow: scroll;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.changelog-item .related-packages table {
    width: 100%;
    border-collapse: collapse;
}


.changelog-item table thead{
    position: sticky;
    top: -1px;
}

.changelog-item th, .changelog-item td {
    border: 1px solid #ddd;
}

.changelog-item th, .changelog-item td {
    padding: 10px;
    text-align: left;
}

.changelog-item th {
    background-color: #f7f7f7;
}

.changelog-item tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.changelog-item tbody tr:hover {
    background-color: #f1f1f1;
}

.copy-button {
    display: inline;
    position: absolute;
    margin-left: 5px;
    cursor: pointer;
    right: 0px;
}

.copy-button img {
    width: 20px;
    height: auto;
    margin-right: 5px;
}

footer {
    margin: 20px 0px;
}

footer .copyright {
    text-align: center;
    margin: 0 auto;
}

.alert-info {
    background-color: #f0f9ff;
    border-left: 6px solid #00bceb;
    color: #333;
    padding: 10px;
    margin-bottom: 20px;
}

.alert-info p.note {
    font-weight: bold;
    color: #00bceb;
}

.alert-info p.warning {
    font-weight: bold;
    color: #ff7f0e;
    display: inline;
}

/* ============================================
   VERSION COMPARISON STYLES
   ============================================ */

/* Mode Toggle Buttons */
.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-toggle button {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #00bceb;
    background-color: white;
    color: #00bceb;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
    font-weight: 500;
}

.mode-toggle button:hover {
    background-color: #e6f7fb;
}

.mode-toggle button.active {
    background-color: #00bceb;
    color: white;
}

/* Hide utility class */
.hide {
    display: none !important;
}

/* Comparison Form */
#comparison-form {
    margin-top: 20px;
}

/* Comparison Results Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.comparison-table th {
    background-color: #00bceb;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-table tbody tr {
    transition: background-color 0.2s;
}

.comparison-table tbody tr:hover {
    background-color: #f5f5f5 !important;
}

/* Color Coding for Changes */
.comparison-table tr.version-changed {
    background-color: #fff3cd; /* Yellow - version changed */
    border-left: 4px solid #ffc107;
}

.comparison-table tr.only-in-a {
    background-color: #f8d7da; /* Red - removed in B */
    border-left: 4px solid #dc3545;
}

.comparison-table tr.only-in-b {
    background-color: #d4edda; /* Green - added in B */
    border-left: 4px solid #28a745;
}

.comparison-table tr.unchanged {
    background-color: #ffffff; /* White - no change */
}

/* Comparison Summary */
.comparison-summary {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f9ff 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 5px solid #00bceb;
}

.comparison-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #00bceb;
    font-size: 1.5em;
}

.summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    padding: 10px 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.stat-item.changed {
    border-left: 4px solid #ffc107;
}

.stat-item.unchanged {
    border-left: 4px solid #6c757d;
}

.stat-item.added {
    border-left: 4px solid #28a745;
}

.stat-item.removed {
    border-left: 4px solid #dc3545;
}

.stat-item strong {
    font-size: 1.2em;
    color: #333;
}

/* Commits Section Styling */
.commits-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.commits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.commits-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.3em;
}

.commits-count-info {
    background: #f0f9ff;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    color: #0066cc;
    font-size: 0.95em;
}

.commits-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
}

.commit-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid #00bceb;
    border-radius: 4px;
    transition: all 0.2s;
}

.commit-item:hover {
    background: #f0f9ff;
    transform: translateX(3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.commit-message {
    font-size: 0.95em;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.5;
}

.commit-message a {
    color: #00bceb;
    text-decoration: none;
}

.commit-message a:hover {
    text-decoration: underline;
}

.commit-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.commit-hash {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    color: #666;
    background: white;
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.commit-hash a {
    color: #666;
    text-decoration: none;
}

.commit-hash a:hover {
    color: #00bceb;
}

.commit-packages {
    font-size: 0.85em;
}

.package-badge {
    background: #e7f3ff;
    color: #0066cc;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    border: 1px solid #b3d9ff;
}

.stat-item.commits {
    border-left: 4px solid #9c27b0;
}

/* Button styling */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mode-toggle {
        flex-direction: column;
    }
    
    .mode-toggle button {
        width: 100%;
    }
    
    .summary-stats {
        flex-direction: column;
    }
    
    .comparison-table {
        font-size: 12px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 5px;
    }
    
    .commits-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .commits-ul {
        max-height: 400px;
    }
    
    .commit-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ============================================
   PACKAGE-LEVEL COMPARISON STYLES
   ============================================ */

/* Compare boxes styling */
.compare-box {
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background: #f9f9f9;
    height: 100%;
    transition: all 0.3s;
}

.compare-box:hover {
    border-color: #00bceb;
    background: #f5f9ff;
}

.compare-box h5 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 15px;
}

.compare-box label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.col-md-6 .form-group {
    padding: 0 10px;
}

/* Version badge variants for commit comparison */
.version-badge {
    background: #00bceb;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.version-badge.in-both {
    background: #28a745;
    color: white;
}

.version-badge.only-in-base {
    background: #ffc107;
    color: #333;
}

.version-badge.only-in-target {
    background: #17a2b8;
    color: white;
}