/* Responsive layout layer for the WEC Job Portal.
   Loaded after the original styles so legacy pages keep their existing theme. */
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body.portal-page {
    margin: 0;
    padding: 18px;
    background: #e7ebef;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}
.portal-shell {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #cbd2d9;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
}
.portal-header { padding: 12px 18px; text-align: center; background: #fff; }
.portal-header a { display: inline-block; max-width: 100%; }
.portal-header img { display: block; width: auto; height: auto; max-width: 100%; max-height: 120px; object-fit: contain; }
.portal-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); align-items: start; border-top: 1px solid #d5dce2; }
.portal-sidebar { min-width: 0; padding: 14px 10px; background: #f1f4f7; border-right: 1px solid #d5dce2; }
.portal-content { min-width: 0; padding: 18px; overflow-x: auto; background: #fff; }
.portal-footer { padding: 10px 16px; color: #68737d; font-size: 11px; text-align: right; border-top: 1px solid #e0e5e9; }
.maintenance-message { max-width: 1500px; margin: 0 auto 12px; padding: 12px; color: #a00000; background: #fff4f4; border: 1px solid #e2aaaa; text-align: center; overflow-wrap: anywhere; }

/* Keep legacy fixed-width content usable: it can scroll within the content area. */
.portal-content img, .portal-content video, .portal-content iframe { max-width: 100%; }
.portal-content table { max-width: 100%; }
.portal-content input, .portal-content select, .portal-content textarea, .portal-content button {
    max-width: 100%;
}
.portal-content input[type="text"], .portal-content input[type="password"],
.portal-content input[type="email"], .portal-content input[type="number"],
.portal-content input[type="date"], .portal-content select, .portal-content textarea {
    min-height: 36px;
}
.portal-content textarea { width: auto; }
.portal-content button, .portal-content input[type="submit"], .portal-content input[type="button"] { min-height: 36px; cursor: pointer; }
#ddblueblockmenu { width: 100%; max-width: 100%; }
#ddblueblockmenu ul { margin: 0; padding: 0; }
#ddblueblockmenu li a { width: auto; min-height: 36px; height: auto; padding: 9px 10px; line-height: 1.3; overflow-wrap: anywhere; }
#ddblueblockmenu div.menutitle { padding: 8px 10px; }
.portal-sidebar p { display: none; }

@media (max-width: 900px) {
    body.portal-page { padding: 10px; }
    .portal-layout { grid-template-columns: 175px minmax(0, 1fr); }
    .portal-content { padding: 14px; }
}
@media (max-width: 650px) {
    body.portal-page { padding: 0; font-size: 14px; }
    .portal-shell { border: 0; border-radius: 0; box-shadow: none; }
    .portal-header { padding: 8px 10px; }
    .portal-header img { max-height: 76px; }
    .portal-layout { display: flex; flex-direction: column; }
    .portal-sidebar { width: 100%; padding: 8px; border-right: 0; border-bottom: 1px solid #cbd2d9; }
    #ddblueblockmenu { max-height: 34vh; overflow-y: auto; border: 1px solid #c5d0da; }
    #ddblueblockmenu li a { min-height: 40px; padding: 10px 12px; }
    #ddblueblockmenu div.menutitle { position: sticky; top: 0; z-index: 1; }
    .portal-content { width: 100%; padding: 12px; overflow-x: auto; }
    .portal-content table { max-width: none; }
    .portal-content input[type="text"], .portal-content input[type="password"],
    .portal-content input[type="email"], .portal-content input[type="number"],
    .portal-content input[type="date"], .portal-content select, .portal-content textarea {
        max-width: 100%; font-size: 16px;
    }
    .portal-content table[width], .portal-content table[style*="width"] { max-width: none; }
    .portal-footer { padding: 10px 12px; }
}

/* Standalone login page (it does not use the shared portal template). */
body.login-page { margin: 0; padding: 12px; text-align: left; background: #e7ebef; }
body.login-page > table { width: 100% !important; max-width: 1200px; margin: 0 auto; }
body.login-page img { max-width: 100%; height: auto; }
body.login-page table { max-width: 100%; }
body.login-page input[type="text"], body.login-page input[type="password"] { width: 100%; max-width: 100%; min-height: 42px; font-size: 16px; }
body.login-page .entryTable { width: 100% !important; max-width: 420px; }
@media (max-width: 600px) {
    body.login-page { padding: 6px; }
    body.login-page td { overflow-wrap: anywhere; }
    body.login-page .entryTable { width: 100% !important; }
}
