/* Wikipedia Vector Theme CSS Clone */

/* ============================================= */
/* 1. VARIABLES AND CORE SETUP                   */
/* ============================================= */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap');

:root {
  /* Color Scheme */
  --page-bg: #f8f9fa;
  --content-bg: #ffffff;
  --border-color: #a2a9b1;
  --border-color-light: #c8ccd1;
  --link-color: #3366cc;
  --link-visited-color: #884fbe;
  --text-color: #202122;
  --header-bg: #eaecf0;

  /* Typography */
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: 'EB Garamond', sans-serif;
}

/* Universal Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--page-bg);
  color: var(--text-color);
}

a {
  text-decoration: none;
  color: var(--link-color);
}
a:visited {
  color: var(--link-visited-color);
}
a:hover {
  text-decoration: underline;
}

/* ============================================= */
/* 2. OVERALL LAYOUT (Three-Column Structure)    */
/* ============================================= */
#app-container {
  display: flex;
  position: relative;
}

/* Left Sidebar Panel */
#mw-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 10rem; /* 160px */
  background-color: var(--page-bg);
  overflow-y: auto;
  border-right: 1px solid var(--border-color-light);
  z-index: 100;
}

/* Main content area */
#mw-content-container {
  margin-left: 10rem; /* Same as sidebar width */
  flex-grow: 1;
  padding: 0 1rem; /* Creates the "slim right margin" */
}

/* ============================================= */
/* 3. LEFT SIDEBAR (#mw-panel)                   */
/* ============================================= */
#mw-panel .logo {
  text-align: center;
  padding: 1rem 0.5rem;
  margin-bottom: 1rem;
}
#mw-panel .logo img {
  max-width: 120px;
  height: auto;
}

.post-content {
  max-width: 100vw;
}
.post-content blockquote {
  font-style: italic;
  border-left: 2px solid grey;
  padding-left: 8px;
  color: darkslategray;
  margin-bottom: 1rem;
}
.post-content p {
  margin-bottom: 1rem;
  word-wrap: break-word;
}
.post-content .image {
  display: flex;
  flex-direction: column;
  font-style: italic;
  font-size: 14px;
  border: 1px solid var(--border-color);
  background-color: var(--page-bg);
  font-size: 0.85em;
  padding: 10px;
  max-width: 30%;
  float: right;
  margin-left: 20px;
  margin-right: 10px;
  gap: 5px;
}
.post-content .image img {
  flex-grow: 0;
  flex-shrink: 0;
  object-fit: contain;
  height: 150px;
}
@media (max-width: 768px ) {
  .post-content .image {
    float: none;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}



.portal {
  padding: 0 0.6rem;
  margin-bottom: 0.5rem;
}

.portal h3,
.portal summary {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 1rem 0 0.5rem;
  padding-left: 0.5rem;
  cursor: pointer;
  list-style: none; /* Hide arrow for summary */
}
.portal summary::-webkit-details-marker {
  display: none; /* Hide arrow for summary */
}

.portal ul {
  list-style: none;
}
.portal li a {
  display: block;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 2px;
}
.portal li a:hover {
  background-color: #eaf3ff;
  text-decoration: none;
}

/* Search Bar */
#searchform input[type="search"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
}

/* ============================================= */
/* 4. HEADER TABS (#mw-head)                     */
/* ============================================= */
#mw-head {
  padding-top: 1rem;
  position: relative;
}

#mw-head-tabs {
  list-style: none;
  display: flex;
  margin-bottom: -1px; /* Overlap border with content border */
}
#mw-head-tabs li a {
  display: block;
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  background-color: #f0f3f5;
  border: 1px solid transparent;
  border-bottom: none;
}
#mw-head-tabs li.selected a {
  background-color: var(--content-bg);
  border-color: var(--border-color);
  border-bottom-color: var(--content-bg);
}
#mw-head-tabs li:not(.selected) a:hover {
  background-color: #e4e8eb;
  text-decoration: none;
}

/* ============================================= */
/* 5. MAIN CONTENT & TYPOGRAPHY (#content)       */
/* ============================================= */
#content {
  background-color: var(--content-bg);
  border: 1px solid var(--border-color);
  padding: 2rem 5rem 2rem 5rem;
  min-height: 100vh;
}

#siteSub {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: normal;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
}

h1.firstHeading {
  font-size: 1.8em;
  border-bottom: 1px solid var(--border-color-light);
  margin-bottom: 0.75rem;
}
h2 {
  font-size: 1.5em;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--border-color-light);
}
h3 {
  font-size: 1.25em;
  margin-top: 1.2rem;
  font-weight: bold;
}



#catlinks {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color-light);
  font-size: 0.9rem;
}

/* ============================================= */
/* 6. COMPONENT STYLING                          */
/* ============================================= */

/* Infobox */
.infobox {
  float: right;
  width: 30%;
  min-width: 250px;
  margin: 0rem 0 1rem 1rem;
  border: 1px solid var(--border-color);
  background-color: var(--page-bg);
  font-size: 0.85em;
}
.infobox .infobox-title {
  font-family: var(--font-heading);
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  padding: 0.75rem;
  background-color: var(--header-bg);
}
.infobox .infobox-image {
  padding: 1rem;
  text-align: center;
}
.infobox .infobox-image img {
  max-width: 100%;
  max-height: 20vh;
}
.infobox .infobox-caption {
  font-size: 0.9em;
  padding: 0.5rem 1rem 0;
}
.infobox .infobox-data {
  width: 100%;
  border-collapse: collapse;
}
.infobox .infobox-data th, .infobox .infobox-data td {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border-color-light);
  text-align: left;
  vertical-align: top;
}
.infobox .infobox-data th {
  font-weight: bold;
}

/* Tables */
.wikitable {
  width: 75%;
  border-collapse: collapse;
  margin: 1rem 0;
  border: 1px solid var(--border-color);
}
.results-table {
  width: 64%;
}
.wikitable th, .wikitable td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
}
.wikitable th {
  background-color: var(--header-bg);
  font-family: var(--font-heading);
  text-align: left;
  font-weight: bold;
}
.wikitable img {
  height: 2rem;
}

/*Party Colours*/

.rpp {
  border-left: 6px solid #d52e5b !important;
}
.bpp, .np {
  border-left: 6px solid #481b4a !important;
}
.vj {
  border-left: 6px solid #009b74 !important;
}
.sok {
  border-left: 6px solid #c58f2b !important;
}
.crf {
  border-left: 6px solid #80acc8 !important;
}
.bd {
  border-left: 6px solid #5831f5 !important;
}
.blf {
  border-left: 6px solid #eb4848 !important;
}





/* Table of Contents */
#toc {
  border: 1px solid var(--border-color);
  background-color: var(--page-bg);
  padding: 1rem;
  width: fit-content;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
#toc #toctitle {
  font-family: var(--font-heading);
  font-weight: bold;
  text-align: center;
  margin-bottom: 0.75rem;
}
#toc ul {
  list-style: none;
}
#toc ul ul {
  margin-left: 2rem;
}

/* ============================================= */
/* 7. FOOTER                                     */
/* ============================================= */

#footer {
  margin-left: 10rem;
  padding: 2rem;
  font-size: 0.8rem;
  border-top: 1px solid var(--border-color-light);
}

#footer ul {
  list-style: none;
  display: inline-block;
  margin-right: 2rem;
}
#footer li {
  display: inline;
  margin-right: 1rem;
}


/* Main container for the election box */
.election-infobox {
  padding: 0; /* Override default infobox padding */
  font-size: 0.9em;
  width: 34%;
  min-width: 360px;
}

/* Subtitle for the election date */
.election-infobox .infobox-subtitle {
  text-align: center;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border-color-light);
  font-size: 0.9em;
  font-weight: bold;
}

/* Container for all the stacked parties */
.election-parties-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
}

/* Individual box for each party */
.election-party-box {
  padding-bottom: 1rem;
}
/* Add a separator line between parties */

/* The colored bar representing the party */
.party-color-bar {
  height: 7px;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Leader's image */
.party-leader-image {
  text-align: center;
  padding: 0 1rem;
}
.party-leader-image img {
  height: 150px;
  max-width: 150px;
  object-fit: contain;
  border: 1px solid var(--border-color-light);
}

/* Party and Leader names */
.party-name, .party-leader-name {
  text-align: center;
  padding: 0.25rem 1rem;
  font-family: var(--font-heading);
}
.party-name {
  font-size: 1.1em;
  font-weight: bold;
}
.party-leader-name {
  font-size: 1em;
}

/* Table for seats and change data */
.party-seats-table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
}
.party-seats-table th, 
.party-seats-table td {
  padding: 0.4rem 1rem;
  text-align: left;
}
.party-seats-table td {
  text-align: right;
  font-weight: bold;
}

/* Specific styling for the seat change indicator */
.seat-change .gain {
  color: #006400; /* Dark Green */
}
.seat-change .loss {
  color: #8b0000; /* Dark Red */
}
.seat-change .no-change {
  color: #54595d; /* Grey */
}


/* ============================================= */
/* 8. RESPONSIVE DESIGN                          */
/* ============================================= */


@media (max-width: 1300px ) {

}

@media (max-width: 1000px){
    #mw-panel {
    display: none;
  }
    #mw-content-container, #footer {
    margin-left: 0;
    width: 100%;
    padding: 0;
  }
    .election-infobox {
    width: 100%;
    float: none;
    margin-left: 0;
    margin-right: 0;
  }
   .wikitable {
    width: 100%;
  }
}

@media (max-width: 800px) {
  #mw-panel {
    display: none; /* Hide sidebar on mobile */
  }

 
  
  #mw-head {
    padding-top: 0;
  }
  
  #content {
    padding: 1rem;
    border-left: none;
    border-right: none;
  }

  .infobox {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

}


