/* Reset some basic styles */
body, h1, ul {
    margin: 0;
    padding: 0;
}

h1 {
    padding-bottom: 32px;
    text-align: center;
}
h2 a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.3s;
}

h2 a:hover {
    color: #2980b9;
}

/* General styles for the body */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
}

/* Styles for the header */
header {
    background-color: #282c34; /* Dark background */
    color: #61dafb; /* Light blue text */
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Container for header content */
.header-container {
    max-width: 1200px; /* Centered container */
    margin: 0 auto;
    text-align: center; /* Center text */
}

/* Header title styles */
header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Navigation styles */
nav ul {
    list-style: none; /* Remove bullets */
    display: flex; /* Flexbox for horizontal layout */
    justify-content: center; /* Center nav items */
    padding: 0;
}

nav ul li {
    margin: 0 15px; /* Space between items */
}

/* Link styles */
nav a {
    color: #61dafb; /* Light blue */
    text-decoration: none; /* Remove underline */
    font-weight: bold; /* Bold text */
    transition: color 0.3s; /* Smooth color change */
}

/* Link hover effect */
nav a:hover {
    color: #21a1f1; /* Darker blue on hover */
}

/* Footer styles */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: #282c34; /* Match header */
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-container {
    max-width: 1200px; /* Centered container */
    margin: 0 auto;
    text-align: center; /* Center text */
}

/* Main content styles */
main {
    padding: 20px;
    max-width: 800px; /* Limit width for content */
    margin: 20px auto; /* Center main content */
}


.centered-form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
}

.custom-button {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    outline: none;
}

.custom-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}


/* Styles for the results container */
.results-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white; /* Use a white background to contrast with dark theme */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 80%;
    margin: 20px auto; /* Center the results container */
}

/* Header and row styles */
.results-header, .results-row {
    display: flex;
    width: 100%;
    padding: 10px;
    justify-content: space-between;
    border-bottom: 1px solid #ddd; /* Light border for separation */
}

/* Header background */
.results-header {
    background-color: #007BFF; /* Primary color */
    color: white;
    font-weight: bold;
}

/* Header and row item styles */
.header-item, .row-item {
    flex: 1; /* Equal space for each item */
    text-align: center; /* Center text */
}

/* Alternating row colors */
.results-row:nth-child(even) {
    background-color: #f9f9f9; /* Light gray for even rows */
}

/* Hover effect for rows */
.results-row:hover {
    background-color: #e9ecef; /* Slightly darker gray on hover */
    cursor: pointer; /* Pointer cursor on hover */
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px; /* Adjust as needed */
}

.loading-text {
    display: flex;
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
}

.loading-text span {
    display: inline-block;
    animation: wave 1.5s infinite;
    animation-delay: calc(0.1s * var(--i));
}

@keyframes wave {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.stages-container {
    padding: 10px;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stage-list {
    list-style-type: none;
    padding-left: 0;
}

.stage-item {
    margin-bottom: 15px;
}

.table-list {
    list-style-type: none;
    padding-left: 20px;
}

.table-item {
    margin-bottom: 10px;
}

.table-name {
    font-weight: bold;
}

.toggle-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-btn:hover {
    background-color: #2980b9;
}

.sql-content {
    display: none;
    margin-top: 5px;
    background-color: #f0f8ff;
    padding: 10px;
    border-left: 4px solid #3498db;
    border-radius: 5px;
    animation-duration: 0.5s;
    animation-fill-mode: forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation-name: fade-in;
}

.run-btn {
    background-color: #2ecc71;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s;
}

.run-btn:hover {
    background-color: #27ae60;
}

.spinner-btn {
    width: 10px;
    height: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin-btn 1s linear infinite;
    margin-left: 10px;
    display: none; /* Ensure it is hidden by default */
}

.spinner-btn.htmx-request {
    display: inline-block; /* or block/flex, depending on your design */
}

@keyframes spin-btn {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.status-message {
    margin-top: 5px;
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
}

.status-success {
    background-color: #2ecc71;
    color: white;
}

.status-failure {
    background-color: #e74c3c;
    color: white;
}

.success-message {
    background-color: #e6ffe6; /* Light green background */
    border: 2px solid #00b300; /* Bright green border */
    border-radius: 10px; /* Rounded corners */
    color: #006600; /* Darker green text */
    padding: 15px 20px; /* Spacing inside the box */
    font-family: 'Arial', sans-serif; /* Clean font */
    font-size: 0.8em; /* Slightly larger text */
    text-align: center; /* Centered text */
    box-shadow: 0 4px 8px rgba(0, 128, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth transition for effects */
}

.success-message:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 6px 12px rgba(0, 128, 0, 0.3); /* Darker shadow on hover */
}

.error-message {
    background-color: #ffe6e6; /* Light red background */
    border: 2px solid #ff4d4d; /* Bright red border */
    border-radius: 10px; /* Rounded corners */
    color: #b30000; /* Darker red text */
    padding: 15px 20px; /* Spacing inside the box */
    font-family: 'Arial', sans-serif; /* Clean font */
    font-size: 0.8em;
    text-align: center; /* Centered text */
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.3s, box-shadow 0.3s; /* Smooth transition for effects */
}

.error-message:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 6px 12px rgba(255, 0, 0, 0.3); /* Darker shadow on hover */
}