/* VCGI State of Vermont-Themed Standards and Guidelines Stylesheet */
/* CSS Version 1.1 */
/* Last Edited: August 2025 */
/* T.Terway / VCGI */

html {
    height: 100%;
}

body {
    font-family: "Source Sans 3", Arial, Helvetica, sans-serif;
    font-size: 12pt; /* Minimum font size as per guidelines */
    line-height: 1.6;
    color: #333333; /* Default dark gray for text, can be adjusted to #000000 if preferred */
    margin: 0;
    padding: 0;
    background-color: #ffffff; /* background */
}

/* --- ADDED UTILITY CLASSES FOR FLEXBOX LAYOUT --- */
.d-flex {
    display: flex !important;
}
.flex-column {
    flex-direction: column !important;
}
.min-vh-100 {
    min-height: 100vh !important;
}
.flex-grow-1 {
    flex-grow: 1 !important;
}

/* Header Styles */
.header-top {
    background-color: #003300; /* VT Dark Green */
    color: #ffffff;
    padding-bottom: .25rem;
    padding-top: .25rem;
    min-height: 0;
    font-size: 0.875rem;
}
.header-top .container {
    max-width: 1600px; /* Match footer container width */
    margin: 0 auto;
    padding-left: 2rem; 
    padding-right: 2rem;
    height: 45px;
    display: flex; /* Added to help with vertical alignment */
    align-items: center; /* Vertically center content */
}
.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ensure it takes full width of container */
}
.header-top-left {
    font-size: 1rem;
}
.header-top-right .state-logo-top-right img {
    vertical-align: middle; /* Good practice for images */
    width: 8rem;
}

.content-wrapper { /* A wrapper for the main content */
    padding: 20px;
    max-width: 800px; /* Reasonable width for readability */
    margin: 20px auto; /* Centering content */
    overflow: auto; /* To contain the floated ToC */
}

.content-wrapper-wide { /* A wrapper for wide content */
    padding: 20px;
    max-width: 100%;
    margin: 20px auto; /* centering content */
}

.content-wrapper-medium { /* A wrapper for images, slightly wider */
    padding: 20px;
    max-width: 90%;
    margin: 20px auto; /* centering content */
}

/* Table of Contents Styles*/
.table-of-contents {
    background-color: #f8f9fa; /* Light grey background */
    border: 1px solid #dee2e6; /* Light border */
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    width: 33%; /* test for less than full container width */
    float: right; /* Float ToC to the right */
    margin-left: 20px; 
}

.table-of-contents h3 {
    font-family: "Source Sans 3", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
    color: #003300; /* VT Dark Green */
    font-size: 1.4em; /* Slightly smaller than main H3 */
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ced4da;
    padding-bottom: 10px;
    display: block; /* Override flex for ToC title */
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.table-of-contents ul ul {
    padding-left: 20px; /* Indentation for sub-levels */
    margin-top: 5px;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    text-decoration: none;
    color: #174a7c; /* VT Dark Blue for links */
    font-weight: normal; /* Overriding general 'a' bolding if any */
}

.table-of-contents a:hover,
.table-of-contents a:focus {
    color: #002248; /* VT Green on hover/focus */
    text-decoration: underline;
}

/* Main Article Content Area - Flows around floated ToC */
.main-article-content {
    box-sizing: border-box;
}

/* General Heading Styles */
h1, h2, h3:not(.table-of-contents h3):not(.vcgi-sidebar-col h2):not(.vcgi-footer-content-col h3), h4, h5, h6 {
    font-family: "Source Sans 3", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
    color: #003300;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.main-article-content > h2:first-child,
.main-article-content > h3:first-child,
.main-article-content > h4:first-child { 
    margin-top: 0; 
}

/* H1 Styles */
h1 {
    font-size: 2.2em;
    border-bottom: 2px solid #007834;
    padding-bottom: 0.3em;
    margin-top: 0;
    margin-bottom: 0;
}

.version-info {
    font-size: 0.9em;
    color: #555555;
    margin-top: 0.5em;
    margin-bottom: 2em;
}

h2, h3:not(.table-of-contents h3):not(.vcgi-sidebar-col h2):not(.vcgi-footer-content-col h3), h4 {
    display: flex;
    align-items: center;
}

h2 {
    font-size: 1.8em;
    padding-bottom: 0.2em;
}

h3:not(.table-of-contents h3):not(.vcgi-sidebar-col h2):not(.vcgi-footer-content-col h3) {
    font-size: 1.5em;
    color: #003300;
}

h4 {
    font-size: 1.2em;
    color: #003300; 
}

p {
    margin-bottom: 1em;
}

a {
    color: #00417e; /* original was #174a7c */
    text-decoration: underline;
}

a:hover, a:focus {
    color: #002248;
    text-decoration: underline;
}

/* ADDED: Figure Caption Styles */
figcaption {
    font-style: italic;         /* Italicizes the text as requested */
    font-size: 0.9em;            /* Makes caption text slightly smaller than body text */
    color: #555555;              /* Uses a muted gray, consistent with other secondary text */
    margin-top: 0.5em;           /* Adds a little space below the image */
    text-align: left;          /* Left caption text under the image */
}

/* Styles for the heading permalink icons */
.heading-permalink {
    margin-left: 0.3em;
    font-size: 0.7em; 
    color: #174a7c;
    text-decoration: none;
    opacity: 1; /* Always visible */
    transition: color 0.2s ease-in-out;
    line-height: 1;
}

h2:hover .heading-permalink,
h3:not(.table-of-contents h3):not(.vcgi-sidebar-col h2):not(.vcgi-footer-content-col h3):hover .heading-permalink,
h4:hover .heading-permalink, 
.heading-permalink:focus {
    color: #002248;
}

.heading-permalink .fas,
.heading-permalink .fa-solid {
    vertical-align: middle;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-family: "Source Sans 3", Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #ffffff;
    background-color: #174a7c; /* originally #07648d to match SoV site */
    border: 2px solid #174a7c; /* originally #07648d to match SoV site */
    padding: 0.6em 1.2em;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    vertical-align: middle;
    line-height: 1.4;
    margin: 0.25em; /* Added for spacing */
}

.btn:hover,
.btn:focus {
    background-color: #fff;
    color: #003300;
    border-color: #003300;
}

.btn .fas,
.btn .fa-solid {
    margin-right: 0.5em;
    font-size: 0.9em;
}

.btn.btn-green {
    background-color: #003300;
    border: 2px solid #003300;
}

.btn.btn-green:hover,
.btn.btn-green:focus {
    background-color: #fff;
    color: #003300;
    border-color: #003300;
}

/* Disabled Button Styles */
.btn:disabled,
.btn.disabled {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #1f1f1f;
    cursor: not-allowed;
    opacity: 0.65;
    pointer-events: none; /* Prevents click events on <a> tags styled as buttons */
}

/* Remove hover/focus effects from disabled buttons */
.btn:disabled:hover,
.btn.disabled:hover,
.btn:disabled:focus,
.btn.disabled:focus {
    background-color: #cccccc;
    border-color: #cccccc;
    color: #1f1f1f;
    outline: none;
}

ul:not(.table-of-contents ul):not(.task-list):not(.vcgi-sidebar-social):not(.vcgi-footer-content-col ul):not(.vcgi-footer-bottom-bar ul),
ol:not(.footnotes ol) {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

blockquote {
    font-style: italic;
    color: #555555;
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 4px solid #d7d2cb;
    background-color: #f9f9f9;
    overflow: auto;
}

blockquote p {
    margin-bottom: 0.5em;
}

code:not([class*="language-"]) {
    font-family: "Courier New", Courier, monospace;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.2em 0.4em;
    border-radius: 8px;
    font-size: 1em;
    color: #303030;
}

pre[class*="language-"] {
    padding: 1em;
    margin: .5em 0;
    overflow: auto;
    border-radius: 8px;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 0.95em;
}

th, td {
    border: 1px solid #333333;
    padding: 0.6em 0.8em;
    text-align: left;
}

th {
    background-color: #e9ecef;
    font-weight: bold;
    color: #003300;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

hr {
    border: 0;
    height: 2px;
    background-color: #555555;
    margin: 2em 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
}

mark {
    background-color: #d3dfd7;
    color: black;
}

/* Notice and Call to Action Box */
.notice, .call-to-action {
    background-color: #d3dfd7; /* Light green, same as mark tag */
    color: #333333; /* Dark text for readability */
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-left: 5px solid #007834; /* VT Green accent */
}

.notice a, .call-to-action a {
    color: #174a7c; /* Standard link color */
    font-weight: bold;
    text-decoration: underline;
}

.notice a:hover, .call-to-action a:hover {
    color: #002248; /* Standard link hover color */
    text-decoration: none;
}

/* Alert Box Styles */
.alert {
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-left: 5px solid;
    overflow: auto;
}

.alert p {
    margin-top: 0;
    margin-bottom: 0.5em;
}

.alert p:last-child {
    margin-bottom: 0;
}

.alert .alert-title,
.notice .alert-title,
.call-to-action .alert-title {
    font-weight: bold;
    font-size: 1.46rem;
    line-height: .9;
    margin-top: 0;
    margin-bottom: .5rem;
    color: #000000;
}

/* Info Alert (Blue) */
.alert-info {
    background-color: #e7f3fe;
    border-color: #174a7c;
    color: #333333;
}

/* Tip Alert (Green) */
.alert-tip {
    background-color: #e6f2eb;
    border-color: #007834;
    color: #333333;
}

/* Important Alert (Purple) */
.alert-important {
    background-color: #f2e7f9;
    border-color: #510c76;
    color: #333333;
}

/* Warning Alert (Yellow) */
.alert-warning {
    background-color: #fffbe6;
    border-color: #f0ad4e;
    color: #333333;
}

/* Danger Alert (Red) */
.alert-danger {
    background-color: #f2dede;
    border-color: #d9534f;
    color: #333333;
}

/* Alert Box Icon Styles */
.alert .alert-title::before,
.notice .alert-title::before,
.call-to-action .alert-title::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900; /* For Solid icons */
    display: inline-block;
    margin-right: 0.6em;
    font-size: 1.1em; /* Increased icon size */
    vertical-align: -0.1em; /* Adjust vertical alignment for larger font */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.alert-info .alert-title::before {
    content: "\f05a"; /* fa-info-circle */
}

.notice .alert-title::before,
.call-to-action .alert-title::before,
.alert-tip .alert-title::before {
    content: "\f0eb"; /* fa-lightbulb */
}

.alert-important .alert-title::before {
    content: "\f0a1"; /* fa-bullhorn */
}

.alert-warning .alert-title::before {
    content: "\f071"; /* fa-exclamation-triangle */
}

.alert-danger .alert-title::before {
    content: "\f06a"; /* fa-exclamation-circle */
}

/* Task List Styles */
.task-list {
    list-style: none;
    padding-left: 0;
}

.task-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5em;
}

.task-list input[type="checkbox"] {
    margin-right: 0.8em;
    width: 1.2em;
    height: 1.2em;
    accent-color: #007834; /* Use VT Green for the checkmark */
    cursor: pointer;
}

.task-list input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    color: #757575;
}

.task-list input[type="checkbox"]:disabled + label {
    color: #999999;
    cursor: not-allowed;
}

/* Card System Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 2em 0;
}

.card {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 3rem;
    color: #003300;
    margin-bottom: 15px;
}

.card-title {
    font-family: "Source Sans 3", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.card-title a {
    text-decoration: none;
    color: #003300; /* VT Dark Green */
}

.card-title a:hover {
    color: #007834; /* VT Green */
    text-decoration: underline;
}

.card-text {
    flex-grow: 1; /* Allows text to take up available space */
    font-size: 0.95em;
    color: #333333;
    margin-bottom: 15px;
}

/* Color Palette Styles */
.color-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin: 1em 0;
}
.color-swatch .color-block {
    height: 100px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    padding: 8px;
}
.color-swatch .color-info {
    font-size: 0.9em;
}
.color-swatch .color-info p {
    margin: 0;
    line-height: 1.4;
    font-weight: bold;
}
.color-swatch .color-info.text-white p {
    color: #ffffff;
}
.bg-vt-green { background-color: #007834; }
.bg-vt-dark-green { background-color: #003300; }
.bg-vt-blue { background-color: #07648d; }
.bg-vt-dark-blue { background-color: #174a7c; }
.bg-rock-gray { background-color: #999999; }
.bg-dark-gray { background-color: #333333; }
.bg-black { background-color: #000000; }
.bg-light-gray { background-color: #f0f0f0; }
.bg-off-white { background-color: #f8f8f8; }
.bg-white { background-color: #ffffff; border: 1px solid #dee2e6; }
.bg-lake-champlain { background-color: #a8d5e5; }
.bg-sky-blue { background-color: #d9eef2; }
.bg-granite { background-color: #d7d2cb; }
.bg-gold { background-color: #f6c51d; }
.bg-danger-red { background-color: #d9534f; }
.bg-success-green { background-color: #5cb85c; }
.bg-warning-yellow { background-color: #f0ad4e; }
.bg-legacy-1 { background-color: #225d39; }
.bg-legacy-2 { background-color: #408740; }
.bg-legacy-3 { background-color: #c3d600; }
.bg-legacy-4 { background-color: #3db5e6; }
.bg-legacy-5 { background-color: #510c76; }
.bg-legacy-6 { background-color: #8d0e57; }
.bg-legacy-7 { background-color: #9c6268; }
.bg-legacy-8 { background-color: #d8a462; }
.bg-legacy-9 { background-color: #ada29a; }
.bg-legacy-10 { background-color: #f5b324; }
.bg-legacy-11 { background-color: #ee7624; }
.bg-legacy-12 { background-color: #b12029; }
.bg-legacy-13 { background-color: #9f912a; }
.bg-legacy-14 { background-color: #457a7c; }
.bg-legacy-15 { background-color: #294635; }
.bg-legacy-16 { background-color: #2b7051; }
.bg-legacy-17 { background-color: #007935; }
.bg-legacy-18 { background-color: #248dc1; }
.bg-legacy-19 { background-color: #004a88; }
.bg-legacy-20 { background-color: #003300; }
.bg-legacy-21 { background-color: #f8f8f8; }
.bg-legacy-22 { background-color: #007834; }
.bg-legacy-23 { background-color: #d7d2cb; }

/* Footnote Styles */
.footnotes {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #333333;
    font-size: 0.9em;
    color: #555555;
}
.footnotes ol {
    padding-left: 20px;
}
.footnotes li {
    margin-bottom: 0.5em;
}

/* Accessible Footnote Links */
sup a,
.footnotes a {
    text-decoration: none; /* Remove default underline to use border instead */
    border-bottom: 1px dotted; /* Add a non-color indicator for accessibility */
}

sup a:hover, sup a:focus,
.footnotes a:hover, .footnotes a:focus {
    border-bottom-style: solid; /* Make underline solid on hover/focus */
}


/* Markdown Guide Styles */
.example-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 2em;
    align-items: start;
}
.example-container .code-block pre,
.example-container .code-block pre[class*="language-"] {
    margin-top: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.rendered-example {
    border: 1px solid #dee2e6;
    padding: 1.5em;
    border-radius: 8px;
    background-color: #f8f9fa;
}
.rendered-example > *:first-child {
    margin-top: 0;
}
 .rendered-example > *:last-child {
    margin-bottom: 0;
}


/* --- ADDED FOOTER STYLES --- */
.vcgi-footer {
    font-family: "Source Sans 3", Arial, Helvetica, sans-serif;
}
.vcgi-footer .grid-container {
    max-width: 1600px;
    width: 100%;
    margin: auto;
}
.vcgi-footer-upper {
    background-color: #f0f0f0;
}
.vcgi-sidebar-col {
    background-color: #bebebe;
    border-top: 0.5rem solid #003300;
    padding: 1.5rem 1rem; /* UPDATED PADDING */
    color: #000;
    /* height: 100%; REMOVED - Flexbox handles the height now */
}
.vcgi-sidebar-col p {
    color: #000;
}
.vcgi-footer-content-col {
    padding-top: 2rem; /* Adjusted from 1.5rem to align with sidebar column title */
}
.vcgi-sidebar-col h2,
.vcgi-footer-content-col h3 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1em;
    color: #000;
    line-height: 1.2;
}
.vcgi-sidebar-col a,
.vcgi-footer-content-col a {
    text-decoration: underline;
}
.vcgi-sidebar-col hr {
    border: 0;
    border-top: 1px solid #a8a8a8;
    margin: 2em 0;
}
.vcgi-sidebar-social {
    list-style: none;
    padding: 0;
    margin: 1.5em 0 1em;
}
.vcgi-sidebar-social li {
    display: inline-block;
    margin-right: 8px;
}
.vcgi-sidebar-social a {
    text-decoration: none;
}
.vcgi-footer-content-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.vcgi-footer-content-col ul li {
    margin-bottom: 0.75em;
}
.usa-footer__return-to-top {
    text-align: right;
    padding-right: 2em;
    padding-left: 2em;
}
.usa-footer__return-to-top a,
.usa-footer__return-to-top a:visited {
    color: #003300;
    text-decoration: underline;
}
.usa-footer__return-to-top a:hover {
    color: #000;
}
.return-to-top-icon svg {
    width: 2em;
    height: 2em;
    color: #003300;
}
.usa-footer__return-to-top a:hover .return-to-top-icon svg {
    color: #000;
}
.vcgi-footer-bottom-bar {
    background-color: #003300;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}
.vcgi-footer-bottom-bar ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}
.vcgi-footer-bottom-bar li {
    padding: 0 5px;
    border-left: none;
}
.vcgi-footer-bottom-bar li:first-child {
    border-left: none;
}
.vcgi-footer-copyright p, .vcgi-footer-copyright a {
    display: inline;
    margin: 0;
    font-size: 1.06rem;
    color: #fff;
    font-weight: 700;
}
.vcgi-footer-copyright a {
    text-decoration: underline;
}
.vcgi-footer-link {
    color: #174a7c;
}
.vcgi-sidebar-col a.vcgi-footer-link {
    color: #174a7c;
}
.vcgi-sidebar-col a.vcgi-footer-link:hover {
    color: #002248;
}
.vcgi-footer-link:hover,
.vcgi-footer-link:focus {
    color: #002248;
}
/* This rule sets the default link color AND underlining */
.vcgi-sidebar-col a.vcgi-footer-link {
    color: #002f5c;
    text-decoration: underline;
}
/* This rule sets the hover color to be the SAME */
.vcgi-sidebar-col a.vcgi-footer-link:hover {
    color: #002f5c;
}

/*
  This targets ALL iframe elements on the page
  when they are focused and removes the outline.
*/
iframe:focus {
  outline: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .header-top-content {
        flex-direction: column;
        gap: 5px;
    }
    .table-of-contents {
        float: none; 
        width: 100%; 
        margin-left: 0; 
        margin-right: 0; 
        margin-bottom: 20px; 
    }
    h1 {
        font-size: 1.8em; 
    }
    h1 img.logo { 
        max-height: 40px;
        margin-right: 10px;
    }
    .logo-placeholder { 
        width: 40px; 
        height: 40px;
        margin-right: 10px;
    }
    h4 { 
        font-size: 1.1em;
    }
    .example-container {
        grid-template-columns: 1fr;
    }
}
