/* ================================================================
   AZ HOA Community Forum - Global Stylesheet
   Color scheme: Navy/Black with subtle Red & Gold accents
   Matches yourazhoaattorney.com branding
   ================================================================ */

/* === BASE === */
body {
    background: #f5f7fa;
    color: #2c3e50;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a:link, a:visited {
    color: #1982d1;
    text-decoration: none;
}
a:hover, a:active {
    color: #c0392b;
    text-decoration: underline;
}

/* === LAYOUT CONTAINERS === */
#container {
    width: 100%;
    margin: 0 auto;
}

.wrapper {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

/* === HEADER / LOGO === */
#header {
    background: transparent;
}

#header #logo {
    display: none;
}

#header ul.menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

#header ul.menu li {
    display: inline;
    margin: 0;
    padding: 0;
}

/* === PANEL (Welcome / Login Bar) === */
#panel {
    margin-bottom: 12px;
}

#panel .upper {
    background: #024985;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
    font-size: 13px;
    overflow: hidden;
}

#panel .upper a:link,
#panel .upper a:visited {
    color: #fff;
    font-weight: bold;
}

#panel .upper a:hover {
    color: #ffc627;
    text-decoration: none;
}

#panel .lower {
    background: #0d1b2a;
    padding: 8px 15px;
    border-radius: 0 0 4px 4px;
    border-bottom: 2px solid #d4a017;
    overflow: hidden;
}

#panel .lower ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#panel .lower ul li {
    display: inline;
    margin-right: 12px;
}

#panel .lower ul.panel_links {
    float: left;
}

#panel .lower ul.user_links {
    float: right;
}

#panel .lower a:link,
#panel .lower a:visited {
    color: #a5d8ff;
    font-size: 13px;
}

#panel .lower a:hover {
    color: #ffc627;
}

/* Quick search in panel */
#panel input[type="text"],
#panel input.textbox {
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
}

#panel input[type="text"]:focus,
#panel input.textbox:focus {
    background: rgba(255,255,255,0.2);
    border-color: #d4a017;
    outline: none;
}

#panel input.button,
#panel input[type="submit"] {
    background: #1982d1;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

#panel input.button:hover,
#panel input[type="submit"]:hover {
    background: #1471b8;
}

/* === WELCOME BLOCKS === */
.welcome {
    color: #fff;
}

.welcome a:link, .welcome a:visited {
    color: #ffc627;
    font-weight: bold;
}

.welcome a:hover {
    color: #fff;
}

/* === FORUM TABLE STRUCTURE === */
table {
    width: 100%;
}

.tborder {
    background: #ddd;
    width: 100%;
    margin: 0 auto 8px;
    border-collapse: separate;
    border-spacing: 1px;
    border-radius: 4px;
    overflow: hidden;
}

/* Category header (collapsible) */
.tcat {
    background: #024985;
    color: #fff;
    padding: 10px 15px;
    font-size: 14px;
    border-bottom: 2px solid #d4a017;
}

.tcat a:link, .tcat a:visited {
    color: #fff;
}

.tcat a:hover {
    color: #ffc627;
}

/* Column headers */
.thead {
    background: #0d1b2a;
    color: #e8e8e8;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
}

.thead a:link, .thead a:visited {
    color: #e8e8e8;
}

.thead a:hover {
    color: #ffc627;
}

/* Alternating rows */
.trow1 {
    background: #fff;
    padding: 8px 12px;
}

.trow2 {
    background: #f8fafc;
    padding: 8px 12px;
}

.trow_shaded {
    background: #fff8e1;
    padding: 8px 12px;
}

.trow_sep {
    background: #e8edf2;
    padding: 6px 12px;
    font-size: 12px;
    color: #555;
}

/* Table footer */
.tfoot {
    background: #e8edf2;
    padding: 8px 12px;
    font-size: 12px;
}

.tfoot a:link, .tfoot a:visited {
    color: #1982d1;
}

/* === BUTTONS === */
.button, input.button, input[type="submit"] {
    background: #024985;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

.button:hover, input.button:hover, input[type="submit"]:hover {
    background: #0d1b2a;
}

/* Small / secondary buttons */
.smalltext .button,
input.button.button_small {
    padding: 4px 10px;
    font-size: 12px;
}

/* === NAVIGATION / BREADCRUMB === */
.navigation {
    font-size: 13px;
    padding: 8px 0;
    margin-bottom: 8px;
    color: #666;
}

.navigation a:link, .navigation a:visited {
    color: #1982d1;
}

.navigation a:hover {
    color: #c0392b;
}

.navigation .active {
    font-weight: bold;
    color: #2c3e50;
}

/* === PAGINATION === */
.pagination {
    padding: 8px 0;
    font-size: 12px;
}

.pagination .pages {
    color: #555;
}

.pagination a:link, .pagination a:visited {
    background: #e8edf2;
    color: #024985;
    padding: 3px 8px;
    border-radius: 3px;
    margin: 0 2px;
}

.pagination a:hover {
    background: #024985;
    color: #fff;
}

.pagination .current_page {
    background: #024985;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
}

/* === POST BIT === */
.post {
    margin-bottom: 8px;
}

.post .thead {
    background: #0d1b2a;
    padding: 8px 12px;
}

.post_author {
    background: #f8fafc;
    border-right: 1px solid #e8edf2;
    padding: 10px;
}

.post_body {
    padding: 12px 15px;
}

.post_content {
    font-size: 14px;
    line-height: 1.65;
}

/* Signature separator */
.signature {
    border-top: 1px solid #e0e6ed;
    margin-top: 15px;
    padding-top: 10px;
    font-size: 12px;
    color: #888;
}

/* === EDITOR === */
.editor_control_bar {
    background: #e8edf2;
    border-bottom: 1px solid #d0d7e0;
}

/* === FORMS / INPUTS === */
input[type="text"], textarea, select, .textbox {
    border: 1px solid #d0d7e0;
    padding: 7px 10px;
    border-radius: 3px;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    font-family: inherit;
    max-width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus, textarea:focus, select:focus, .textbox:focus {
    border-color: #024985;
    outline: none;
    box-shadow: 0 0 0 2px rgba(2, 73, 133, 0.15);
}

/* === FOOTER === */
#footer {
    margin-top: 15px;
}

#footer .upper {
    background: #0d1b2a;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
    border-top: 2px solid #d4a017;
}

#footer .upper a:link, #footer .upper a:visited {
    color: #a5d8ff;
    font-size: 13px;
}

#footer .upper a:hover {
    color: #ffc627;
}

#footer .lower {
    background: #024985;
    color: #cce0f0;
    padding: 10px 15px;
    border-radius: 0 0 4px 4px;
    font-size: 12px;
    text-align: center;
}

#footer .lower a:link, #footer .lower a:visited {
    color: #a5d8ff;
}

#footer .lower a:hover {
    color: #ffc627;
}

#footer .upper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#footer .upper ul li {
    display: inline;
    margin-right: 15px;
}

#footer .upper ul.bottom_links {
    float: left;
}

#footer #current_time {
    float: right;
    color: #cce0f0;
}

/* === COLLAPSE IMAGES === */
.expcolimage {
    float: right;
}

.expcolimage img {
    vertical-align: middle;
}

/* === FORUM BIT (forum listing) === */
.forum_status {
    margin-right: 8px;
    vertical-align: middle;
}

/* Forum icon - new posts indicator with gold accent */
td.forum_new {
    border-left: 3px solid #d4a017;
}

/* Subject/thread with new posts */
a.subject_new,
.subject_new a:link,
.subject_new a:visited {
    color: #024985;
    font-weight: bold;
}

/* Thread prefix styling */
.thread_prefix {
    font-weight: bold;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 2px;
    margin-right: 4px;
}

/* === PRIVATE MESSAGES === */
#pm_notice {
    background: #fff8e1;
    border: 1px solid #d4a017;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #5d4e00;
}

#pm_notice a:link, #pm_notice a:visited {
    color: #024985;
    font-weight: bold;
}

/* === MODERATION === */
.moderation_tools {
    padding: 8px 0;
}

/* === ALERTS / NOTICES === */
.red_alert {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 3px solid #c0392b;
    color: #991b1b;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.high_warning {
    color: #c0392b;
    font-weight: bold;
}

/* === QUICK REPLY === */
#quick_reply_form {
    margin-top: 10px;
}

/* === USERCP / PROFILE === */
.profile_avatar img {
    border-radius: 4px;
    border: 2px solid #e8edf2;
}

/* Online indicator with gold dot */
.online_status {
    color: #d4a017;
}

/* === STAR RATINGS === */
.star_rating {
    color: #d4a017;
}

/* === MISC === */
.smalltext {
    font-size: 12px;
}

.largetext {
    font-size: 16px;
    font-weight: bold;
}

.float_left { float: left; }
.float_right { float: right; }
.clear { clear: both; }

hr {
    border: none;
    border-top: 1px solid #e0e6ed;
    margin: 15px 0;
}

blockquote {
    background: #f0f4f8;
    border-left: 3px solid #024985;
    margin: 10px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 0 4px 4px 0;
}

blockquote cite {
    font-weight: bold;
    color: #024985;
    display: block;
    margin-bottom: 5px;
}

code {
    background: #f0f4f8;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    color: #c0392b;
}

.codeblock {
    background: #1b2838;
    color: #e8e8e8;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
}

.codeblock .title {
    background: #0d1b2a;
    color: #a5d8ff;
    padding: 6px 12px;
    margin: -12px -12px 10px;
    border-radius: 4px 4px 0 0;
    font-size: 12px;
}

/* === FORUM LEGEND === */
dl.forum_legend {
    padding: 10px 0;
    font-size: 12px;
}

dl.forum_legend dt {
    float: left;
    margin-right: 5px;
}

dl.forum_legend dd {
    margin-right: 15px;
    float: left;
}

/* === MODAL / POPUP === */
.modal {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal .thead {
    border-radius: 6px 6px 0 0;
}

/* === SELECTION / HIGHLIGHT === */
::selection {
    background: #024985;
    color: #fff;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */

/* === TABLET (max-width: 768px) === */
@media (max-width: 768px) {
    /* Reduce spacing */
    .tcat { font-size: 13px; padding: 8px 10px; }
    .thead { font-size: 12px; padding: 6px 10px; }
    .trow1, .trow2 { padding: 6px 8px; }
    .trow1 td, .trow2 td { padding: 6px 8px; }

    /* Panel adjustments */
    #panel .upper, #panel .lower { padding: 8px 10px; }
    #panel .lower ul.panel_links,
    #panel .lower ul.user_links { float: none; text-align: center; }
    #panel .lower ul li { margin-right: 8px; }

    /* Buttons */
    .button, input.button { padding: 6px 14px; font-size: 12px; }

    /* Thread listing: hide views (col 5) and rating (col 6) on tablet */
    td[class*="forumdisplay"]:nth-child(5),
    td[class*="forumdisplay"]:nth-child(6) {
        display: none;
    }

    /* Prevent horizontal overflow on tables, eliminate grey box from hidden columns */
    .tborder { max-width: 100%; overflow-x: auto; background: transparent; border-collapse: collapse; }
    .tborder tr { border-bottom: 1px solid #ddd; }

    /* Footer stacking */
    #footer .upper ul.bottom_links { float: none; text-align: center; margin-bottom: 6px; }
    #footer #current_time { float: none; text-align: center; display: block; margin-top: 4px; }
    #footer .upper ul li { margin-right: 8px; }

    /* Navigation */
    .navigation { font-size: 12px; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

    /* Forum legend */
    dl.forum_legend dt, dl.forum_legend dd { float: none; display: inline-block; }

    /* Post author column */
    .post_author { padding: 8px; font-size: 12px; }
    .post_body { padding: 10px 12px; }

    /* Blockquote */
    blockquote { margin: 8px 0; padding: 8px 12px; }
}

/* === MOBILE (max-width: 480px) === */
@media (max-width: 480px) {
    /* Base */
    body { font-size: 13px; }

    /* Tables - force responsive layout, eliminate grey box from hidden columns */
    .tborder { border-radius: 0; border-spacing: 0; margin: 0 0 6px; background: transparent; border-collapse: collapse; }
    .tborder tr { border-bottom: 1px solid #ddd; }
    .tcat { padding: 8px; font-size: 12px; border-radius: 0; }
    .thead { padding: 5px 8px; font-size: 11px; }
    .trow1, .trow2 { padding: 5px 6px; }
    .trow1 td, .trow2 td { padding: 5px 6px; font-size: 12px; }

    /* Thread listing: hide icon (col 1), prefix (col 2), views (col 5), rating (col 6), last post (col 7) on mobile */
    td[class*="forumdisplay"]:nth-child(1),
    td[class*="forumdisplay"]:nth-child(2),
    td[class*="forumdisplay"]:nth-child(5),
    td[class*="forumdisplay"]:nth-child(6),
    td[class*="forumdisplay"]:nth-child(7) {
        display: none;
    }

    /* Thread listing header: hide Views (col 3), Rating (col 4), Last Post (col 5) to match data rows */
    .tcat:nth-child(3),
    .tcat:nth-child(4),
    .tcat:nth-child(5) {
        display: none;
    }

    /* Forum description - hide on mobile for cleaner look */
    .tborder td > div.smalltext { display: none; }

    /* Last post text in forum index - compact on mobile */
    .tborder td[align="right"] .smalltext { font-size: 10px; }

    /* Prevent horizontal overflow (grey box) — iOS Safari needs html + position:relative */
    html { overflow-x: hidden !important; }
    body { overflow-x: hidden !important; position: relative; width: 100% !important; }
    #page, #main, #mybb-wrapper, #container, .wrapper, #content {
        max-width: 100% !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Force tables to fit viewport */
    .tborder { max-width: 100% !important; width: 100% !important; box-sizing: border-box; }
    .tborder td { box-sizing: border-box; padding: 4px 5px !important; }

    /* Thread listing: subject column fills width, replies column compact */
    td[class*="forumdisplay"]:nth-child(3) { width: auto !important; word-wrap: break-word; }
    td[class*="forumdisplay"]:nth-child(4) { width: 40px !important; text-align: center; }

    /* Force table layout so hidden columns release their space */
    .tborder { table-layout: auto !important; }

    /* Post bit - stack author above content (div-based layout) */
    .post_author {
        float: none !important;
        width: 100% !important;
        border-right: none;
        border-bottom: 1px solid #e8edf2;
        padding: 8px;
        text-align: left;
        box-sizing: border-box;
        overflow: hidden;
    }

    .post_content {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 10px 8px;
        box-sizing: border-box;
    }

    .post_body {
        padding: 10px 8px;
        box-sizing: border-box;
    }

    .post_controls {
        clear: both;
    }

    /* Author info horizontal on mobile */
    .post_author .author_avatar { float: left; margin-right: 8px; }
    .post_author .author_avatar img { max-width: 40px; max-height: 40px; }
    .post_author .author_information { overflow: hidden; }
    .post_author .author_statistics { clear: both; font-size: 11px; margin-top: 4px; }

    /* Post content */
    .post_content { font-size: 13px; line-height: 1.55; word-wrap: break-word; overflow-wrap: break-word; }

    /* Panel - full stacking */
    #panel .upper { border-radius: 0; }
    #panel .lower { border-radius: 0; }
    #panel .lower ul li { display: block; margin: 3px 0; text-align: center; }
    #panel input[type="text"],
    #panel input.textbox { width: 100% !important; box-sizing: border-box; margin-bottom: 5px; }

    /* Buttons - touch-friendly */
    .button, input.button, input[type="submit"] {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
    }

    /* Forms - full width */
    input[type="text"], textarea, select, .textbox {
        width: 100% !important;
        box-sizing: border-box;
        font-size: 16px !important; /* prevents iOS zoom on focus */
    }

    /* Registration/login form tables - only target specific form pages */
    .tborder .trow1 td.trow1,
    .tborder .trow2 td.trow2 { display: block !important; width: 100% !important; }

    /* Navigation breadcrumb */
    .navigation { padding: 5px 4px; font-size: 11px; }

    /* Pagination - touch friendly */
    .pagination a:link, .pagination a:visited, .pagination .current_page {
        padding: 6px 10px;
        margin: 2px;
        display: inline-block;
        min-width: 30px;
        text-align: center;
    }

    /* Footer */
    #footer .upper { border-radius: 0; padding: 8px; }
    #footer .lower { border-radius: 0; padding: 8px; font-size: 11px; }
    #footer .upper ul li { display: block; margin: 3px 0; text-align: center; }
    #footer .upper ul.bottom_links { float: none; }
    #footer #current_time { float: none; text-align: center; display: block; }

    /* Signature */
    .signature { font-size: 11px; }

    /* Code blocks */
    .codeblock { font-size: 11px; padding: 8px; }

    /* Moderation tools */
    .moderation_tools select { width: 100%; margin-bottom: 5px; }

    /* Quick reply */
    #quick_reply_form textarea { width: 100% !important; box-sizing: border-box; min-height: 100px; }

    /* Large text */
    .largetext { font-size: 14px; }

    /* Thread prefix */
    .thread_prefix { font-size: 10px; padding: 1px 4px; }

    /* Profile avatar */
    .profile_avatar img { max-width: 80px; }

    /* PM notice */
    #pm_notice { padding: 6px 8px; font-size: 12px; border-radius: 0; }

    /* Red alert */
    .red_alert { padding: 8px 10px; font-size: 12px; border-radius: 0; }

    /* Expander images */
    .expcolimage { margin-left: 4px; }

    /* Forum legend - compact */
    dl.forum_legend { font-size: 11px; }
    dl.forum_legend dt { margin-right: 3px; }
    dl.forum_legend dd { margin-right: 10px; }

    /* Modal - full width on mobile */
    .modal { width: 95% !important; margin: 10px auto !important; border-radius: 4px; }
}