/* General body styles */
:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1e3f73;
    --primary-light: #4a7bc8;
    --accent-color: #5c9ead;
    --background-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --hover-color: #f5f8fa;
    --error-color: #d32f2f;
    --success-color: #2e7d32;
    --table-header-bg: #f8f9fa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

/* Container styles */
.container {
    padding: 0 20px;
    margin: 0 auto;
    width: 95%;
    max-width: 1400px;
}

/* Heading styles */
h1 {
    text-align: left;
    font-size: 2.2em;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h2 {
    font-family: 'Roboto', sans-serif;
    text-align: left;
    font-size: 1.5em;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

/* List item styles */
ul li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Paragraph styles */
p {
    margin-bottom: 1em;
    line-height: 1.7;
}

/* GitHub link styles */
.github-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--background-color);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.github-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.github-link a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.github-link img {
    width: 32px;
    height: auto;
    vertical-align: middle;
}

.github-link span {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    vertical-align: middle;
    color: var(--primary-color);
    font-weight: 500;
}

/* Content container styles */
.indexcontent {
    text-align: left;
    max-width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.7;
}

/* Code block styles */
code {
    background-color: #f5f7fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
}

pre {
    background-color: #f5f7fa;
    padding: 12px;
    border-radius: 4px;
    display: block;
    margin: 10px 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

pre code {
    background-color: transparent;
    padding: 0;
    border: none;
    font-size: 0.9em;
    white-space: pre;
}

/* Content container styles */
.pagescontent {
    text-align: left;
    max-width: 80%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.7;
}

/* Specific content section styles */
.specific-content {
    margin-top: 50px;
    background-color: var(--hover-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 8px;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.last-updated {
    text-align: right;
    font-size: 0.9em;
    color: var(--text-light);
}

/* Button container styles within content */
.content .button-container {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    font-size: 0.9em;
    color: var(--text-light);
}

/* Select option styles */
select option {
    width: auto;
    padding: 8px;
}

select {
    cursor: pointer;
}

/* Error border styles */
.error {
    border: 2px solid var(--error-color) !important;
    background-color: #ffebee;
}

/* Top bar styles */
.top-bar {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Top bar link styles */
.top-bar a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 16px 20px;
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}

/* Remove border from the last link in the top bar */
.top-bar a:last-child {
    border-right: none;
}

/* Hover effect for top bar links */
.top-bar a:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-1px);
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    overflow: hidden;
}

/* Table header and cell styles */
th, td {
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    text-align: left;
    font-family: 'Roboto', sans-serif;
}

/* Table header background color */
th {
    background-color: var(--table-header-bg);
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

/* Even row background color */
tr:nth-child(even) {
    background-color: #fafbfc;
}

/* Row hover effect */
tr:hover {
    background-color: var(--hover-color);
    transition: background-color 0.2s ease;
}

tbody tr {
    transition: all 0.2s ease;
}

/* Input and select styles */
input, select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Button styles */
button {
    padding: 10px 20px;
    margin-top: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

button:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

/* Dropdown item hover effect */
.dropdown-content div:hover {
    background-color: var(--hover-color);
    cursor: pointer;
}

/* Dropdown container styles */
.dropdown {
    position: relative;
    display: inline-block;
    font-size: 1em;
}

.dynamic-width-dropdown {
    font-size: 1em;
    width: auto;
    min-width: 200px;
    box-sizing: border-box;
}

/* Input field styles */
#search {
    width: auto;
    min-width: 400px;
    box-sizing: border-box;
    font-size: 1em;
}

/* Dropdown content styles */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-content div {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-content div strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form group styles */
.form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

/* Form group label styles */
.form-group label {
    margin-right: 10px;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text-color);
    min-width: 140px;
}

/* Button container styles */
.button-container {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

/* Separator styles */
.separator {
    border-top: 2px solid var(--border-color);
    margin: 30px 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

/* Right align container styles */
.adt-file-generate-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    text-align: left;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Right align container styles */
.download-metadata-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    text-align: left;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Generate CSV button styles */
.generate-csv-button {
    margin-top: 10px;
    width: 100%;
}

/* CSV name input styles */
.csv-name-input {
    margin-top: 10px;
    width: 100%;
    min-width: 200px;
}

.edit-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.corrected-name {
    flex: 1;
    text-align: left;
}

.edit-input {
    flex: 1;
    box-sizing: border-box;
    vertical-align: middle;
    font-size: 0.95em;
}

.edit-button, .save-button {
    cursor: pointer;
    vertical-align: middle;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    font-size: 0.85em;
    padding: 6px 12px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-button:hover, .save-button:hover {
    background-color: #4a8a98;
    transform: translateY(-1px);
}

.remove-button {
    cursor: pointer;
    vertical-align: middle;
    font-family: 'Roboto', sans-serif;
    text-align: center;
    color: white;
    background-color: var(--error-color);
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.remove-button:hover {
    background-color: #b71c1c;
    transform: translateY(-1px);
}

.add-row-button {
    background-color: var(--success-color);
}

.add-row-button:hover {
    background-color: #1b5e20;
}

/* Link styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.3em;
    }
    
    .container {
        width: 98%;
        padding: 0 10px;
    }
    
    .indexcontent, .pagescontent {
        max-width: 100%;
    }
    
    table {
        font-size: 0.85em;
        display: block;
        overflow-x: auto;
    }
    
    th, td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    input[type="text"], select {
        width: 100% !important;
        min-width: unset !important;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #search {
        min-width: 100% !important;
    }
    
    .top-bar a {
        padding: 12px 10px;
        font-size: 0.9em;
    }
    
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-group label {
        min-width: unset;
        margin-bottom: 5px;
    }
    
    .adt-file-generate-container,
    .download-metadata-container {
        position: static;
        margin: 20px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .github-link {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .github-link span {
        display: none;
    }
    
    button {
        width: 100%;
        padding: 12px;
    }
    
    .edit-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .edit-button, .save-button, .remove-button {
        width: 100%;
        margin-top: 4px;
    }
}

/* Tablet responsiveness */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 96%;
    }
    
    .indexcontent, .pagescontent {
        max-width: 90%;
    }
    
    table {
        font-size: 0.9em;
    }
}

/* Delete row button styles */
.delete-row-button {
    background-color: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    margin: 0;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    width: auto;
    min-width: auto;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: none;
}

.delete-row-button:hover {
    background-color: #b71c1c;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.delete-row-button:active {
    transform: scale(0.95);
}

/* Back to tools navigation */
.back-to-tools {
    margin-bottom: 20px;
}

.back-to-tools a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: transparent;
}

.back-to-tools a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}