/* Base Styles from User */
:root {
    --primary-color: #00BFA5; /* Teal/Green */
    --primary-hover: #008c7a; /* Darker Teal for hover */
    --secondary-color: #4A4A4A; /* Dark Gray for text */
    --light-gray: #f4f7f6;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --white: #FFFFFF;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.08);

    /* Additional for docs */
    --code-bg: #272822; /* Dark background for code blocks (Atom One Dark like) */
    --code-text: #abb2bf; /* Light text for code blocks */
    --code-border: #3a3f4a;
    --success-color: #28a745;
    --error-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.6;
    padding: 0.5rem;
}

.navbar {
    display: flex;
    width: calc(100% - 1rem); /* Adjusted for body padding */
    max-width: 1000px;
    margin: 0 auto 1rem auto;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.navbar .logo { /* Style for the logo image/container */
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
    display: flex; /* As per user's CSS, in case logo is complex */
    align-items: center;
    justify-content: center;
}
.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--medium-gray);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

header h1 {
    margin: 0;
    font-size: 28px;
    color: var(--dark-gray);
}

/* Button styles from user */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
}
.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}


/* API Documentation Specific Styles */
section {
    margin-bottom: 40px;
}
section:last-child {
    margin-bottom: 20px;
}

section h2 {
    font-size: 24px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

section h3 {
    font-size: 20px;
    color: var(--dark-gray);
    margin-top: 30px;
    margin-bottom: 15px;
}
section h3 + p { /* Paragraph immediately following H3 */
    margin-top: -10px; /* Pull up P slightly */
}


.info-text {
    font-size: 15px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    background-color: var(--light-gray);
    padding: 12px 18px;
    border-radius: var(--border-radius);
    border-left: 5px solid var(--primary-color);
}


.route-info {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    border: 1px solid var(--medium-gray);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.http-method {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
}

.route-path {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    color: var(--dark-gray);
    background-color: #e0e7ed; /* Light blue-gray */
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* Table Styles (using existing user styles as base) */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    background-color: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
    vertical-align: top;
}
tbody tr:last-child td {
    border-bottom: none;
}

th {
    background-color: var(--light-gray);
    color: var(--secondary-color);
    font-weight: 600;
    white-space: nowrap;
}

/* More specific td sizing for parameter table */
table thead th:nth-child(1) { width: 15%; } /* Parameter */
table thead th:nth-child(2) { width: 8%; }  /* Type */
table thead th:nth-child(3) { width: 10%; }  /* Required */
table thead th:nth-child(4) { width: 10%; } /* Default */
table thead th:nth-child(5) { width: 20%; } /* Options */
table thead th:nth-child(6) { width: 37%; } /* Description */

tbody tr:hover {
    background-color: #f8f9fa;
}

td code { /* For inline code in table cells */
    background-color: #e9ecef;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #c7254e; /* Bootstrap-like color for inline code */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
td ul {
    margin-top: 5px;
    margin-bottom: 0;
    padding-left: 18px;
}
td ul li {
    margin-bottom: 3px;
}

/* Code Block Styles */
.code-block-container {
    position: relative;
    margin-top: 10px;
    margin-bottom: 20px;
    background-color: var(--code-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--code-border);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    color: var(--code-text);
    background-color: transparent; /* Handled by container */
}

pre code { /* Reset for code inside pre */
    padding: 0;
    background-color: transparent;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

.copy-code-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 5px 10px; /* Slightly smaller */
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.7;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}
.code-block-container:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background-color: var(--dark-gray);
}

.copy-code-btn.copied {
    background-color: var(--primary-color);
    opacity: 1;
}

/* Structure Generator / Validator */
.structure-generator {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
    margin-top: 10px;
}

.structure-generator p {
    margin-top: 0;
    margin-bottom: 10px;
}
.structure-generator p:last-of-type {
    margin-bottom: 0;
}
.structure-generator p em {
    color: var(--secondary-color);
}
.structure-generator ul {
    padding-left: 20px;
    margin-bottom: 15px;
}
.structure-generator li {
    margin-bottom: 5px;
}

/* User's .create-modal-label adapted */
.create-modal-label {
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 600; /* Bolder */
    color: var(--dark-gray);
    font-size: 0.95em;
}

/* User's .jobDescription class for textarea base styles */
.jobDescription {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--medium-gray);
    border-radius: 6px; /* Slightly less than var(--border-radius) based on user CSS */
    margin-bottom: 10px; /* Reduced from 18px */
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: var(--white); /* Changed from light-gray for better contrast */
    color: var(--dark-gray);
    outline: none;
}
.jobDescription:focus {
    border-color: var(--primary-color);
    background-color: var(--white); /* Keep white on focus */
    box-shadow: 0 0 0 2px rgba(0, 191, 165, 0.25); /* Primary color focus ring */
}

/* Specifics for the JSON input textarea */
#jsonStructureInput {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    min-height: 200px; /* Increased min-height */
    resize: vertical;
    margin-top: 5px;
}

.validation-message {
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    display: none; /* Hidden by default */
}
.validation-message.success {
    color: var(--success-color);
    background-color: #e6f7ec;
    border: 1px solid #b7e1cd;
    display: block;
}
.validation-message.error {
    color: var(--error-color);
    background-color: #fdecea;
    border: 1px solid #f8c9c9;
    display: block;
}


/* Responsive adjustments from user & new ones */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    .navbar {
        width: 100%;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0.5rem; /* Reduce padding */
    }
    .navbar-brand span {
        font-size: 1rem; /* Smaller brand text */
    }
    .container {
        margin-top: 0;
        border-radius: 0;
        padding: 20px;
    }
    header h1 {
        font-size: 24px;
    }
    section h2 {
        font-size: 20px;
    }
    section h3 {
        font-size: 18px;
    }

    /* Adjust table for smaller screens */
    table thead th:nth-child(1),
    table thead th:nth-child(2),
    table thead th:nth-child(3),
    table thead th:nth-child(4),
    table thead th:nth-child(5),
    table thead th:nth-child(6) {
        width: auto; /* Allow natural sizing */
        white-space: nowrap;
    }
    td {
        min-width: 120px; /* Min width for cells when scrolling */
    }
    td:nth-child(1) { font-weight: 500; } /* Slightly bolder parameter name */
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    header h1 {
        font-size: 22px;
    }
    .route-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    pre {
        font-size: 13px;
        padding: 15px;
    }
    .btn {
        font-size: 13px;
        padding: 8px 15px;
    }
    .btn-sm {
        font-size: 12px;
        padding: 5px 10px;
    }
}