/* =========================================================
   AQ REPORTING GUIDE — GREY REPORTNET-STYLE THEME
   ========================================================= */

/* ---------------------------------------------------------
   General layout
   --------------------------------------------------------- */

.wy-nav-content {
    max-width: 1200px !important;
    padding: 40px 55px;
}

.wy-nav-content-wrap {
    background: hsl(0, 0%, 95%);
}

/* ---------------------------------------------------------
   Typography
   --------------------------------------------------------- */

body,
.wy-nav-content,
.wy-menu-vertical,
.rst-content {
    font-family: Arial, Helvetica, sans-serif;
    color: #33383D;
}

.rst-content {
    font-size: 14px;
    line-height: 1.35;
}

.rst-content p {
    margin-bottom: 10px;
}

.rst-content ul,
.rst-content ol {
    margin-bottom: 10px;
}

.rst-content li {
    margin-bottom: 4px;
}

/* ---------------------------------------------------------
   Top banner and logo area
   --------------------------------------------------------- */

.wy-side-nav-search,
.wy-nav-top {
    background: #4F555A !important;
}

.wy-side-nav-search {
    border-bottom: 1px solid #D5D5D5;
}

/* Remove home icon but keep project title */
.wy-side-nav-search > a.icon-home::before {
    display: none !important;
}

/* Project title */
.wy-side-nav-search > a.icon-home {
    display: block;
    color: #FFFFFF !important;
    font-weight: 600;
    font-size: 18px;
    padding-top: 110px;
    position: relative;
}

/* EEA logo above title */
.wy-side-nav-search > a.icon-home::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 88px;
    background-image: url("EEA.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Search box */
.wy-side-nav-search input[type="text"] {
    border: 1px solid #C8C8C8;
    border-radius: 2px;
    background: #FFFFFF;
    color: #33383D;
    box-shadow: none;
}

/* ---------------------------------------------------------
   Left navigation
   --------------------------------------------------------- */

.wy-nav-side {
    background: #F4F4F4 !important;
    border-right: 1px solid #D8D8D8;
}

.wy-menu-vertical p.caption {
    display: none !important;
}

.wy-menu-vertical a {
    color: #68717A !important;
    background: transparent !important;
}

.wy-menu-vertical a:hover {
    background: #E8E8E8 !important;
    color: #202428 !important;
}

.wy-menu-vertical li.current > a,
.wy-menu-vertical li.on > a {
    background: #E3E3E3 !important;
    color: #202428 !important;
    border-left: 4px solid #666D73 !important;
    font-weight: 600;
}

.wy-menu-vertical li.current a {
    border-color: #D4D4D4;
}

.wy-menu-vertical li.toctree-l1.current > a {
    background: #DDDDDD !important;
    color: #202428 !important;
}

.wy-menu-vertical li.toctree-l2.current > a,
.wy-menu-vertical li.toctree-l3.current > a {
    background: #ECECEC !important;
    color: #202428 !important;
}

/* ---------------------------------------------------------
   Headings
   --------------------------------------------------------- */

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
    font-family: Arial, Helvetica, sans-serif;
    color: #252A2E;
}

.rst-content h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 22px;
}

.rst-content h2 {
    font-size: 1.45em;
    font-weight: 600;
    border-bottom: 1px solid #BFC3C6;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.rst-content h3 {
    font-size: 1.15em;
    font-weight: 600;
    margin-top: 22px;
    margin-bottom: 10px;
    background: #F2F2F2;
    padding: 6px 9px;
    border-left: 4px solid #737A80;
}

/* ---------------------------------------------------------
   Links
   --------------------------------------------------------- */

.rst-content a,
.rst-content a:visited {
    color: #65717A;
    text-decoration: underline;
}

.rst-content a:hover {
    color: #24282C;
}

.toctree-wrapper a {
    font-weight: 500;
}

.toctree-wrapper > ul > li > a {
    font-size: 1.15em;
}

/* ---------------------------------------------------------
   Tables
   --------------------------------------------------------- */

.rst-content table.docutils {
    border: 1px solid #D1D1D1;
}

.rst-content table.docutils td,
.rst-content table.docutils th {
    padding: 4px 6px;
    font-size: 13px;
    line-height: 1.25;
    white-space: normal !important;
    border: 1px solid #D1D1D1;
}

.rst-content table.docutils th {
    background: #E4E4E4;
    color: #252A2E;
    font-weight: 700;
}

.rst-content table.docutils tr:nth-child(even) {
    background: #F7F7F7;
}

/* ---------------------------------------------------------
   Contents title
   --------------------------------------------------------- */

.rst-content p.topic-title {
    color: #353A3E !important;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Code and literal text
   --------------------------------------------------------- */

.rst-content code,
.rst-content tt {
    background: #F0F0F0;
    border: 1px solid #DDDDDD;
    color: #33383D;
}

/* ---------------------------------------------------------
   Relationship dropdowns
   --------------------------------------------------------- */

/* Space between individual relationship dropdowns */
.rst-content details.sd-dropdown {
    margin-top: 0;
    margin-bottom: 14px;
    border: 1px solid #C9CDD0 !important;
    border-radius: 4px;
    box-shadow: none !important;
    overflow: hidden;
}

/* Relationship title bar */
.rst-content details.sd-dropdown > summary,
.rst-content details.sd-dropdown > summary.sd-summary-title,
.rst-content .sd-dropdown > .sd-summary-title {
    padding: 11px 14px !important;
    background: #E4E6E8 !important;
    border-left: 5px solid #666D73 !important;
    color: #252A2E !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
}

/* Actual text inside the dropdown title */
.rst-content details.sd-dropdown > summary .sd-summary-text,
.rst-content .sd-summary-title .sd-summary-text {
    color: #252A2E !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

/* Hover state for relationship title */
.rst-content details.sd-dropdown > summary:hover,
.rst-content details.sd-dropdown > summary.sd-summary-title:hover {
    background: #D9DCDE !important;
    color: #171A1D !important;
}

/* Open relationship title */
.rst-content details.sd-dropdown[open] > summary,
.rst-content details.sd-dropdown[open] > summary.sd-summary-title {
    background: #DDE0E2 !important;
    border-bottom: 1px solid #C9CDD0 !important;
}

/* Dropdown arrow */
.rst-content details.sd-dropdown > summary::marker {
    color: #5E666C;
}

.rst-content details.sd-dropdown > summary .sd-summary-state-marker {
    color: #5E666C !important;
}

/* Dropdown content */
.rst-content details.sd-dropdown > div.sd-summary-content,
.rst-content details.sd-dropdown > .sd-summary-content {
    padding: 16px 16px 10px 16px !important;
    background: #FFFFFF;
}

/* Preserve the existing internal subtitles */
.rst-content details.sd-dropdown .sd-summary-content > p > strong,
.rst-content details.sd-dropdown .sd-summary-content strong {
    color: #33383D;
}

/* ---------------------------------------------------------
   Landing page cards
   --------------------------------------------------------- */

.landing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
    margin: 30px 0;
}

.landing-card {
    display: block;
    padding: 20px;
    border: 1px solid #D0D0D0;
    border-left: 5px solid #6B7278;
    border-radius: 4px;
    background: #F7F7F7;
    text-decoration: none !important;
    color: #33383D !important;
}

.landing-card:hover {
    background: #ECECEC;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.landing-icon {
    font-size: 30px;
    margin-bottom: 8px;
}

.landing-title {
    font-size: 18px;
    font-weight: 700;
    color: #34393D;
    margin-bottom: 6px;
}

.landing-text {
    font-size: 14px;
    line-height: 1.35;
    color: #51575C;
}

/* ---------------------------------------------------------
   Version information
   --------------------------------------------------------- */

.version-info {
    font-size: 0.80em;
    font-style: italic;
    color: #777777;
    border-bottom: 1px solid #D0D0D0;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

/* ---------------------------------------------------------
   Breadcrumbs and footer
   --------------------------------------------------------- */

.wy-breadcrumbs {
    color: #747B81;
}

.wy-breadcrumbs a {
    color: #747B81;
}

footer {
    color: #777D82;
}

/* ---------------------------------------------------------
   Reporting tables illustrated matrix
   --------------------------------------------------------- */

.reporting-table-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 25px;
}

/* Entire card is clickable */
.rst-content a.reporting-table-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 190px;
    padding: 10px;
    overflow: hidden;

    color: #333333;
    background: #FFFFFF;
    border: 1px solid #D4D4D4;
    border-radius: 5px;

    text-align: center;
    text-decoration: none;
    box-shadow: none;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease,
        transform 0.15s ease;
}

.rst-content a.reporting-table-card:hover {
    color: #111111;
    background: #F2F2F2;
    border-color: #777777;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Table name */
.reporting-table-title {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;
    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

/* Identical image area for every card */
.reporting-table-image {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Normalises illustrations having different dimensions */
.rst-content .reporting-table-image img {
    display: block;
    width: 100%;
    height: 125px;
    max-width: 100%;
    margin: 0;
    padding: 0;

    object-fit: contain;
    object-position: center;
    border: 0;
}

/* ---------------------------------------------------------
   Responsive reporting table grid
   --------------------------------------------------------- */

/* Five columns on moderately wide screens */
@media screen and (max-width: 1250px) {
    .reporting-table-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Four columns on smaller desktop screens */
@media screen and (max-width: 1050px) {
    .reporting-table-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Three columns on tablets */
@media screen and (max-width: 800px) {
    .reporting-table-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Two columns on phones */
@media screen and (max-width: 550px) {
    .reporting-table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rst-content a.reporting-table-card {
        height: 175px;
    }

    .rst-content .reporting-table-image img {
        height: 110px;
    }
}

/* Reference-only table cards */

.rst-content a.reporting-table-card.reference-only-table {
    background: #2b2f33;
    border-color: #111417;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

.rst-content a.reporting-table-card.reference-only-table:hover {
    background: #1f2225;
    border-color: #000000;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.38);
}

.rst-content a.reporting-table-card.reference-only-table .reporting-table-title {
    color: #ffffff;
}

.rst-content a.reporting-table-card.reference-only-table .reporting-table-image {
    background: #3a3f44;
}

.rst-content a.reporting-table-card.reference-only-table:hover .reporting-table-image {
    background: #32363a;
}

.rst-content .reference-only-badge {
    display: inline-block;
    align-self: center;
    margin: 0.15rem 0 0.45rem;
    padding: 0.18rem 0.55rem;
    color: #ffffff;
    background: #0d0f11;
    border: 1px solid #686d72;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

/* =========================================================
   AURA FAMILY NAVIGATION
   Shell-only addition. Existing Reference Guide greys and
   core-page styling remain unchanged.
   ========================================================= */

.wy-side-nav-search {
    padding: 0 0 10px !important;
}

.aura-branding {
    margin: 0 0 10px;
    background: #4F555A;
    text-align: center;
}

.aura-brand-row {
    padding: 12px 10px 8px;
    white-space: nowrap;
}

.aura-eea-link {
    display: inline-block;
    vertical-align: middle;
    width: 115px;
    margin: 0 4px 0 0;
    padding: 0 !important;
}

.aura-eea-logo {
    display: block !important;
    width: 100px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    object-fit: contain;
}

.aura-name {
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.04em;
}

.aura-sites {
    width: 100%;
    font-size: 16px;
    line-height: 1.2;
    text-align: right;
}

.aura-sites a,
.aura-sites .aura-current {
    display: block;
    min-height: 31px;
    padding: 6px 18px 6px 10px;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

.aura-sites a:hover,
.aura-sites a:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF !important;
}

.aura-sites .aura-current {
    background: #FFFFFF;
    color: #202428 !important;
    font-weight: 600;
}

/* Search keeps the Reference/Reporting grey treatment. */
.wy-side-nav-search input[type="text"] {
    margin: 0 10px;
    width: calc(100% - 20px);
}

/* The AURA block replaces the old project-title/logo construction. */
.wy-side-nav-search > a.icon-home {
    display: none !important;
}
