/* ============================================================
   Xephyr - shared layout styles.
   All colours and images come from CSS custom properties set in
   theme1.css / theme2.css / theme3.css so the three legacy looks
   share one stylesheet.
   ============================================================ */

* { box-sizing: border-box; }

body {
    margin: 0;
    background-color: var(--body-bg);
    background-image: var(--body-img);
    background-repeat: repeat-x;
    background-attachment: fixed;
    background-position: center top;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    color: var(--text);
    text-align: center;
}

.page { display: inline-block; text-align: center; }

a:link, a:visited, a:active {
    color: var(--link);
    text-decoration: none;
    font-weight: bold;
}
a:hover { color: #999999; }

/* ---- tables (the game is intentionally table-based, like the original) */
table {
    border: 2px solid var(--border);
    border-collapse: collapse;
    text-align: center;
    color: var(--text);
    font-size: 12px;
    margin-left: auto;
    margin-right: auto;
}
th {
    background-color: var(--border);
    background-image: var(--header-img);
    border-bottom: 2px solid var(--border);
    color: var(--heading-text, var(--text));
    padding: 3px;
}
tr { border-top: 2px solid var(--border); }
td { text-align: center; padding: 3px; }

table.map, table.map td, table.map tr { border: 0; color: #ffffff; }

/* ---- outer frame ---- */
table.frame {
    width: 800px;
    background-color: var(--frame-bg);
    border: 0;
}
.banner-cell {
    border-bottom: 2px solid var(--border);
    background-color: var(--border);
}
.banner-cell img { max-width: 100%; }
.strip-cell { background-color: var(--border); }
table.strip {
    width: 100%;
    background-color: var(--frame-bg);
    border: 0;
}
table.strip tr {
    background-image: var(--header-img);
    border: 0;
}
.main-row { vertical-align: top; }
.nav-cell {
    width: 250px;
    border-right: 5px solid var(--border);
    vertical-align: top;
    background-repeat: repeat-y;
}
.content-cell { vertical-align: top; width: 550px; }

/* ---- form fields ---- */
input, select, textarea {
    background-color: var(--field);
    border: 2px solid var(--field);
    border-radius: 10px;
    font-family: Calibri, Helvetica, Arial, Geneva, sans-serif;
    font-size: 12px;
    color: var(--field-text, var(--text));
    padding: 2px 4px;
}
fieldset { border: 2px solid var(--border); margin-bottom: 8px; }

/* ---- navigation ---- */
.navlist {
    list-style: none;
    margin: 4px 0;
    padding: 0;
}
.navlist li {
    list-style-type: none;
    width: 85%;
    margin: 0 auto;
    border: 2px solid var(--field);
    border-radius: 10px;
    background-color: var(--nav-bg);
    background-image: var(--header-img);
    padding: 2px 0;
    font-size: 12px;
    font-weight: bold;
    color: var(--heading-text, var(--text));
}
.navlist li a { display: block; }

.dropdown { position: relative; cursor: default; }
.dropmenu {
    display: none;
    position: absolute;
    left: 95%;
    top: -2px;
    width: 150px;
    margin: 0;
    padding: 0;
    background-color: var(--border);
    border: 3px solid var(--field);
    border-radius: 10px;
    z-index: 100;
    font: normal 12px Verdana;
    line-height: 18px;
}
.dropdown:hover .dropmenu { display: block; }
.dropmenu li {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background-color: var(--field);
    background-image: none;
    padding: 0;
}
.dropmenu li a {
    display: block;
    width: 100%;
    border-bottom: 1px solid #000000;
    text-decoration: none;
    font-weight: bold;
}

/* ---- online list striping (legacy classes) ---- */
.online1 { color: #666666; }
.online2 { color: #ffffff; }
.pm-unread { color: var(--pm-unread, #ffffff); }
.pm-read   { color: #333333; }

/* ---- footer ---- */
table.footer-bar { width: 810px; background-color: var(--footer-bg); border: 0; }
table.footer-bar tr, table.footer-bar td { border: 0; }
.small { font-size: 10px; }
.brand { color: #c37b04 !important; text-decoration: none; }
.panel-admin { font-size: 13px; color: #9b040f !important; }
.panel-mod   { font-size: 13px; color: #17630b !important; }
.panel-event { font-size: 13px; color: #d0510c !important; }

/* ---- flash messages ---- */
.flash {
    width: 85%;
    margin: 4px auto;
    padding: 6px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    background-color: var(--field);
}
.flash-error   { color: #d04040; }
.flash-success { color: #4fae4f; }
.flash-info    { color: var(--text); }

/* ---- haven chat ---- */
#div_chat {
    text-align: left;
    height: 300px;
    width: 500px;
    overflow: auto;
    background-color: #1c1c1c;
    border: 1px solid #555555;
    color: #cccccc;
    margin: 0 auto;
    padding: 4px;
}
.chat_time { color: #777777; font-size: 10px; }
