/* Partner area layout — based on Mail_BMC template */

* {
    font-family: Mulish, sans-serif;
    box-sizing: border-box;
}

input, select, textarea, button {
    font-family: inherit;
}

body {
    font-family: Mulish, sans-serif;
    color: var(--tm-text, #333);
    margin: 0;
    padding: 0;
    background-color: var(--tm-bg, #f5f5f5);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Header ---- */

.pl-header-wrapper {
    background-color: var(--tm-header, #e0e0e0);
    position: relative;
}

header.pl-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 110px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px 16px;
}

.pl-logo {
    width: 7rem;
}

.pl-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-search {
    padding: 5px 10px;
    border: 1px solid var(--tm-hamburger-border, #999);
    border-radius: 3px;
    font-size: 0.9em;
    background: var(--tm-popup-input-bg, rgba(255, 255, 255, 0.7));
    width: 200px;
}

.pl-hamburger {
    background: var(--tm-popup-bg, #e7e1dc);
    border: 1px solid var(--tm-popup-border, #c0b6ae);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.6em;
    padding: 6px 13px;
    color: var(--tm-popup-label, #63574c);
    line-height: 1;
    box-shadow: 2px 3px 6px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.4);
    transition: box-shadow 0.12s ease;
}

.pl-hamburger:hover {
    box-shadow: inset 2px 3px 7px rgba(0,0,0,0.22);
}

.pl-help {
    position: absolute;
    bottom: -1.3rem;
    right: 20px;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: var(--tm-popup-bg, #e7e1dc);
    border: 2px solid var(--tm-popup-border, #c0b6ae);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--tm-popup-label, #63574c);
    text-decoration: none;
    box-shadow: 2px 3px 7px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.4);
    transition: box-shadow 0.12s ease, color 0.12s ease;
    z-index: 100;
}
.pl-help:link, .pl-help:visited { color: var(--tm-popup-label, #63574c); text-decoration: none; }
.pl-help:hover { box-shadow: inset 2px 3px 7px rgba(0,0,0,0.22); color: var(--tm-popup-heading, #3a4a6b); text-decoration: none; }

.pl-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.pl-nomcom {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--tm-text, #333);
    white-space: nowrap;
}

.pl-logout {
    font-size: 0.75em;
    color: var(--tm-muted-text, #666);
    text-decoration: none;
}

.pl-logout:hover {
    color: var(--tm-client-alert, #c00);
    text-decoration: underline;
}

/* ---- Nav panel ---- */

#pl-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--tm-panel-bg, #fff);
    border: 1px solid var(--tm-panel-border, #ccc);
    box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 2000;
}

#pl-nav.pl-nav-open {
    display: block;
}

#pl-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

#pl-nav li {
    padding: 0;
    border-bottom: 1px solid var(--tm-hairline, #eee);
}

#pl-nav li:last-child {
    border-bottom: none;
}

#pl-nav li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--tm-link, #3333cc);
    text-decoration: none;
    font-size: 0.95em;
    white-space: nowrap;
}

#pl-nav li a:hover {
    background: var(--tm-panel-alt-bg, #f5f5f5);
    text-decoration: none;
    color: var(--tm-link-hover, #0000ff);
}

#pl-nav li.pl-nav-active a {
    color: var(--tm-popup-heading, #3a4a6b);
    font-weight: bold;
}

/* ---- DEV badge ---- */

.pl-dev-badge {
    position: absolute;
    top: 5px;
    left: calc(7rem + 30px);
    background: #dc3545;
    color: #fff;
    padding: 2px 8px;
    font-weight: bold;
    font-size: 0.8em;
    border-radius: 3px;
    z-index: 30;
}
.pl-dev-badge.local { background: #28a745; }
.pl-dev-badge.local.off-master { background: #dc3545; }
.pl-dev-badge.local.staging { background: #4169e1; }

/* ---- Main content ---- */

div.main_body { padding: 1em; }

main.pl-main {
    flex: 1;
    padding: 40px 20px 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ---- Footer ---- */

footer.pl-footer {
    background-color: var(--tm-header, #e0e0e0);
    border-top: 1px solid var(--tm-footer-border, #ccc);
    margin-top: auto;
}

.pl-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 20px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.pl-footer-logo {
    width: 7rem;
    flex-shrink: 0;
}

h1.footer {
    font-family: 'Cormorant Upright', serif;
    color: var(--tm-muted-text, #918378);
    font-size: 1.1rem;
    margin: 0 0 0.3rem 0;
    font-weight: 400;
}

p.footer {
    font-size: 0.75rem;
    color: var(--tm-muted-text, #918378);
    margin: 0 0 0.1rem 0;
}

hr.footer {
    border: none;
    border-top: thin solid var(--tm-muted-text, #918378);
    margin: 0.7rem 0;
}

/* ---- Notification banners (used by session_login.php) ---- */

.msg-error {
    padding: 10px;
    background: var(--tm-status-error-bg, #f8d7da);
    color: var(--tm-status-error-text, #721c24);
    border: 1px solid var(--tm-status-error-border, #f5c6cb);
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9em;
}

.msg-notice {
    padding: 10px;
    background: var(--tm-status-warning-bg, #fff3cd);
    color: var(--tm-status-warning-text, #856404);
    border: 1px solid var(--tm-status-warning-border, #ffeeba);
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9em;
}

.msg-success {
    padding: 10px;
    background: var(--tm-status-success-bg, #d4edda);
    color: var(--tm-status-success-text, #155724);
    border: 1px solid var(--tm-status-success-border, #c3e6cb);
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ---- Typography — from Mail_BMC.css ---- */

* b {
    color: var(--tm-text, #222);
}

p {
    text-align: left;
    margin: 0.8rem 0.3rem 0.8rem 0;
    line-height: 1.6;
}

p.small, p.small * {
    font-size: 0.8rem;
    margin: 0;
}

h1, h2, h3, h4, h5 {
    font-family: 'Cormorant Upright', serif;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
    color: var(--tm-popup-heading, #3a4a6b);
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.35rem; text-decoration: underline; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

hr {
    margin: 2rem 0 1rem 0;
    border: none;
    border-top: thin solid var(--tm-muted-text, #918378);
}

ul {
    margin: 0.8rem 0 0.8rem -0.5rem;
    list-style: disc outside;
}

ul ul {
    margin: 0.5rem 0 0.5rem -0.5rem;
    list-style: circle outside;
}

li {
    margin: 0.2rem 0.5rem;
    line-height: 1.5;
}

a {
    color: var(--tm-link, #3333cc);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--tm-link-hover, #0000ff);
}

a.footnote-ref, a.footnote-backref {
    font-size: 0.6rem;
}

div.footnotes li {
    font-size: 0.8rem;
}

blockquote {
    margin: 1.2rem 0;
    padding: 0.8rem 1rem 0.8rem 1.5rem;
    color: var(--tm-popup-label, #63574c);
    background-color: var(--tm-popup-bg, #e7e1dc);
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
}

div.terms {
    margin: 1.2rem 0;
    padding: 1rem 1rem 1rem 1.5rem;
    background-color: var(--tm-panel-bg, #fff);
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
}

div.note {
    margin: 1.2rem 0;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    background-color: var(--tm-popup-bg, #e0d2c6);
    color: var(--tm-text, #000);
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
}

div.note * {
    font-family: 'Cormorant Upright', serif;
    font-size: 1.2rem;
}

div.encart {
    font-family: 'Cormorant Upright', serif;
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 1.5rem 0;
    padding: 0.3rem 1rem 0.2rem 1.5rem;
    background: var(--tm-popup-bg, #e2d1c4);
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
}

table {
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    font-size: 0.95rem;
    padding: 0.3rem 0.7rem;
    vertical-align: top;
}

th {
    font-weight: bold;
    background-color: var(--tm-popup-bg, #e0d2c6);
}

pre, code {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    word-break: break-word;
}

img:not(.pl-logo, .pl-footer-logo, .inline, .left, .right) {
    float: right;
    clear: right;
    margin: .4rem;
    margin-right: 0;
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
    max-width: 50%;
}

img.inline, img.left {
    float: left;
    clear: left;
    margin: 0.3rem 1rem 0.3rem 0;
}

img.right {
    float: right;
    clear: right;
    margin: 0.3rem 0 0.3rem 1rem;
}

/* ---- Expand/collapse sections ---- */

div.expand {
    padding: 0.5em;
    background-color: var(--tm-panel-bg, #fff);
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

/* ---- Status indicators ---- */

p.ok, div.ok         { border: 1px outset; background-color: var(--tm-note-approved, #bbffaa); padding: 0.3em 0.8em; margin: 0.3em 0; }
p.warning, div.warning { border: 1px outset; background-color: var(--tm-note-alert, #ffbbaa); padding: 0.3em 0.8em; margin: 0.3em 0; }
p.notice, div.notice { border: 1px outset; background-color: var(--tm-cell-uncommitted, #ffe87c); padding: 0.3em 0.8em; margin: 0.3em 0; }

/* ---- Rates page ---- */

.mainT { margin: 1em 0; }

/* ---- Option trigger button (partner pDispo) ---- */

.opt-trigger-btn {
    background: var(--tm-popup-bg, #e7e1dc);
    border: 1px solid var(--tm-popup-border, #c0b6ae);
    border-radius: 3px;
    color: var(--tm-popup-label, #63574c);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    padding: 1px 8px 2px;
    line-height: 1.4;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.35);
    transition: box-shadow 0.1s ease;
    vertical-align: middle;
}
.opt-trigger-btn:hover {
    box-shadow: inset 1px 2px 4px rgba(0,0,0,0.18);
}

/* ---- pDispo page elements ---- */

blockquote.dispo-caveat {
    background-color: var(--tm-header, #e0e0e0);
    padding: 0.5em 1em;
    box-shadow: 3px 3px 12px -6px rgba(0, 0, 0, 1);
}

.dispo-hint-box {
    float: right;
    position: relative;
    border: 4px solid var(--tm-header, #e0e0e0);
    padding: .5em;
    box-shadow: 0px 8px 5px -6px #999;
    background-color: var(--tm-bg, #f5f5f5);
}

#schedDispo {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background-color: var(--tm-popup-bg, #f6f1e0);
    font-size: small;
    padding: .3em;
    box-shadow: 0px 8px 5px -6px #999;
    z-index: 2000;
}
