/* General Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background-color: #ffffff;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* Main Content Area Styles */
.main-content {
    flex: 1;
    padding: 1.5rem;
    background-color: #ffffff;
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-config-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-config-title h3 {
    margin: 0;
}

.app-config-name {
    font-weight: 500;
    color: #495057;
}

.app-config-id {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: normal;
}


.revision-history-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Audit History Banner Styles */
.appconfig-history-banner {
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    /* Align banner with table boundaries */
    position: relative;
    left: 0; /* Align with table left edge */
    width: 100%; /* Match table container width */
    max-width: none;
}

.banner-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.banner-icon {
    color: #2196f3;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.banner-text {
    color: #1565c0;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.banner-text strong {
    font-weight: 600;
}

/* Results Summary Styles */
.results-summary {
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    color: #6b7280;
    font-size: 0.875rem;
}

.results-text {
    font-weight: bold;
}

/* Table Styles */
.table-container {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.revision-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.table-header-row {
    background-color: #f8f9fa;
}

.table-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table-cell {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #4a5568;
    white-space: nowrap;
}

.table-cell.bg-alternate {
    background-color: #f8f9fa;
}

.radio-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.revision-link {
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

/* Author Name Styles */
.author-name {
    display: inline-block;
}

.author-arn {
    border-bottom: 1px dotted #4a5568;
}

.author-arn:hover {
    color: #2d3748;
    border-bottom-color: #2d3748;
}


.no-data-message {
    text-align: center;
    padding: 3rem;
    color: #718096;
    font-size: 1rem;
}

/* Simplified Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Controls and Pagination Layout */
.controls-and-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 1rem;
    flex-wrap: wrap;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Simplified Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.compare-button {
    background-color: #e2e8f0;
    color: #718096;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.2s;
    font-size: 0.875rem;
    white-space: nowrap;
}

.compare-button-active {
    background-color: #4299e1;
    color: white;
    border-color: #3182ce;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.2);
}

.compare-button-active:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3);
}

.badge-deleted {
    background-color: #d9534f;
}

/* Simple Pagination Styles */
.pagination-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 8px;
    padding: 0.5rem;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.25rem;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
}

.page-number:hover {
    color: #333;
}

.page-number-active {
    color: #333;
    font-weight: 600;
}

.ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    color: #666;
    font-size: 0.875rem;
    font-weight: 400;
    user-select: none;
}

.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background-color: transparent;
    color: #666;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-arrow:not(:disabled):hover {
    color: #333;
}

.nav-arrow:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Reduce the Parent Left padding of 250px */
#wrapper.app-config-history {
    padding-left: 10px;
}


/* Remove the Left border */
.app-config-history #page-content-wrapper {
    border-left: none;
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.25rem;
    }

    .revision-table {
        min-width: 650px;
    }
}

@media (max-width: 768px) {
    .controls-and-pagination {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .left-controls {
        justify-content: center;
    }

    .pagination-controls {
        justify-content: center;
    }

    .pagination-wrapper {
        justify-content: center;
        align-self: center;
    }

    .main-content {
        padding: 1rem;
    }

    .table-container {
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    .revision-table {
        min-width: 600px;
    }

    .table-header,
    .table-cell {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .compare-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }

    .results-summary {
        padding: 0.5rem 0;
    }

    .results-text {
        font-size: 0.8125rem;
    }

    .no-data-message {
        padding: 2rem;
        font-size: 0.9375rem;
    }

    .appconfig-history-banner {
        padding: 10px 12px;
        margin-bottom: 16px;
        left: 0; /* Keep aligned with table */
        width: 100%; /* Match table container width */
    }

    .banner-text {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0.75rem;
    }

    .revision-table {
        min-width: 550px;
    }

    .table-header,
    .table-cell {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }

    .compare-button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        width: 100%;
        max-width: 300px;
    }

    .pagination-wrapper {
        padding: 0.375rem;
    }

    .page-number,
    .nav-arrow {
        min-width: 28px;
        height: 28px;
        font-size: 0.8125rem;
    }

    .ellipsis {
        min-width: 28px;
        height: 28px;
        font-size: 0.8125rem;
    }


    .revision-link {
        word-break: break-all;
        max-width: 120px;
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }

    .revision-history-container {
        margin: 0;
    }

    .table-container {
        border-radius: 4px;
        margin-bottom: 0.75rem;
    }

    .revision-table {
        min-width: 480px;
    }

    .table-header,
    .table-cell {
        padding: 0.375rem 0.5rem;
        font-size: 0.6875rem;
    }

    .radio-input {
        width: 14px;
        height: 14px;
    }

    .compare-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.6875rem;
    }

    .pagination-wrapper {
        padding: 0.25rem;
        gap: 0.125rem;
    }

    .page-number,
    .nav-arrow {
        min-width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .ellipsis {
        min-width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .pagination-numbers {
        gap: 0.0625rem;
    }

    .revision-link {
        max-width: 100px;
    }

    .no-data-message {
        padding: 1.5rem;
        font-size: 0.875rem;
    }

    .loading-container {
        padding: 2rem;
    }

    .loading-spinner-large {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }

    .loading-message {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) and (pointer: coarse) {
    .page-number,
    .nav-arrow {
        min-width: 32px;
        height: 32px;
    }

    .radio-input {
        width: 18px;
        height: 18px;
    }

    .compare-button {
        min-height: 44px;
    }
}
