.tpv-portal-head,.tpv-form,.tpv-search,.tpv-ticket-list,.tpv-ticket-header,.tpv-conversation{box-sizing:border-box;max-width:960px;margin:1.5rem auto}.tpv-portal-head{display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;padding:2.2rem 2.4rem;background:linear-gradient(125deg,#073c68 0%,#116b9c 56%,#50a5bd 100%);border-radius:18px;color:#fff;box-shadow:0 18px 42px rgba(7,60,104,.16)}.tpv-portal-head h1,.tpv-ticket-heading h1{margin:.25rem 0 .55rem;font-size:2rem;line-height:1.15}.tpv-portal-head p{max-width:600px;margin:0;color:#d8eef4}.tpv-kicker{display:block;color:#81d0d5;font-size:.75rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.tpv-outline-button{display:inline-block;flex:0 0 auto;border:1px solid rgba(255,255,255,.7);border-radius:999px;color:#fff!important;font-weight:700;padding:.7rem 1rem;text-decoration:none}.tpv-guidance{display:flex;gap:.75rem;flex-wrap:wrap;max-width:960px;margin:-.75rem auto 1.5rem}.tpv-guidance span,.tpv-tag,.tpv-status{display:inline-block;border-radius:999px;font-size:.78rem;font-weight:700;padding:.36rem .65rem}.tpv-guidance span{background:#e8f3f5;color:#145f79}.tpv-form{padding:2rem 2.2rem;background:#fff;border:1px solid #dbe5ea;border-radius:16px;box-shadow:0 10px 25px rgba(12,59,82,.06)}.tpv-compose{border-top:5px solid #f0b742}.tpv-form p{margin:0 0 1.25rem}.tpv-form label{display:block;color:#173a4b;font-weight:800}.tpv-field-help{display:block;margin:.35rem 0 .55rem;color:#657983;font-size:.84rem;font-weight:400}.tpv-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.tpv-form input[type=text],.tpv-form textarea,.tpv-form select{box-sizing:border-box;width:100%;max-width:100%;margin-top:.55rem;background:#fbfdfe;border:1px solid #b9cbd4;border-radius:8px;color:#183441;font:inherit;padding:.75rem .85rem}.tpv-form textarea{line-height:1.55;resize:vertical}.tpv-attachments{padding:1rem;background:#f1f8f9;border:1px dashed #8bb9c3;border-radius:9px}.tpv-attachments input{margin-top:.6rem}.tpv-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid #e2ebef;padding-top:1.2rem}.tpv-privacy{margin:0!important;color:#607681;font-size:.82rem;font-weight:400}.tpv-form button,.tpv-search button{border:0;border-radius:8px;background:#0b6699;color:#fff;cursor:pointer;font:inherit;font-weight:800;padding:.78rem 1.15rem}.tpv-form button:hover,.tpv-search button:hover{background:#064d78}.tpv-error,.tpv-success{box-sizing:border-box;max-width:960px;margin:1rem auto;padding:1rem 1.1rem;border-radius:8px}.tpv-error{background:#fff0ef;border-left:4px solid #c43831}.tpv-success{background:#ebf8ed;border-left:4px solid #2f8d42}.tpv-search{display:flex;gap:.6rem;padding:1rem;background:#f4f7f8;border:1px solid #dce6ea;border-radius:12px}.tpv-search input,.tpv-search select{min-width:0;border:1px solid #b9cbd4;border-radius:7px;padding:.6rem .7rem}.tpv-search input{flex:1}.tpv-ticket-list{display:grid;gap:.75rem}.tpv-ticket-card{display:grid;grid-template-columns:165px 1fr auto;align-items:center;gap:1rem;padding:1.15rem 1.3rem;background:#fff;border:1px solid #dce7ea;border-radius:12px;box-shadow:0 4px 12px rgba(12,59,82,.035);color:#173a4b!important;text-decoration:none}.tpv-ticket-card:hover{border-color:#5b9eb4;box-shadow:0 8px 18px rgba(12,59,82,.1);transform:translateY(-1px)}.tpv-ticket-card strong{font-size:1.05rem}.tpv-ticket-code{color:#0873a8;font-size:.8rem;font-weight:800;letter-spacing:.04em}.tpv-ticket-meta{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}.tpv-ticket-meta time{color:#71818a;font-size:.78rem}.tpv-tag{background:#edf5f6;color:#236879}.tpv-priority-high{background:#fff0e5;color:#aa5613}.tpv-status{background:#eaf4f7;color:#126c86}.tpv-status-answered{background:#e9f6e9;color:#267238}.tpv-status-waiting_customer{background:#fff5db;color:#906313}.tpv-status-closed{background:#edf0f2;color:#5f6b72}.tpv-empty{padding:2.5rem;text-align:center;background:#f5f8f9;border:1px dashed #b4cad2;border-radius:12px;color:#536974}.tpv-empty strong{display:block;color:#163c4d;font-size:1.2rem}.tpv-empty a{font-weight:800}.tpv-ticket-header{padding:1.8rem 2rem;background:#fff;border:1px solid #dce7ea;border-radius:16px}.tpv-back-link{color:#0b6f9e;font-weight:700;text-decoration:none}.tpv-ticket-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-top:1rem}.tpv-ticket-heading h1{color:#153a4b}.tpv-ticket-header .tpv-ticket-meta{border-top:1px solid #e5edef;margin-top:.8rem;padding-top:1rem}.tpv-conversation{position:relative}.tpv-conversation h2{color:#163b4c;font-size:1.1rem}.tpv-message{max-width:82%;margin:1rem 0;padding:1rem 1.1rem;background:#eef5f7;border:1px solid #d9e8ed;border-radius:4px 14px 14px 14px}.tpv-message.tpv-admin{margin-left:auto;background:#eaf7eb;border-color:#d2ead5;border-radius:14px 4px 14px 14px}.tpv-message-top{display:flex;align-items:center;gap:.55rem}.tpv-message-top time{margin-left:auto;color:#71818a;font-size:.78rem}.tpv-role{background:rgba(15,108,134,.1);border-radius:999px;color:#22687b;font-size:.7rem;font-weight:700;padding:.2rem .45rem}.tpv-message-body{margin-top:.65rem;color:#203c48;line-height:1.55}.tpv-reply-box{margin-top:2rem}.tpv-reply-title{display:flex;justify-content:space-between;margin-bottom:1rem}.tpv-reply-title h2{margin:.25rem 0;color:#173a4b}.tpv-list-head{margin-bottom:1rem}@media(max-width:700px){.tpv-portal-head,.tpv-compose-footer{align-items:stretch;flex-direction:column}.tpv-portal-head{padding:1.7rem}.tpv-portal-head h1,.tpv-ticket-heading h1{font-size:1.55rem}.tpv-form,.tpv-ticket-header{padding:1.35rem}.tpv-field-grid{grid-template-columns:1fr}.tpv-ticket-card{grid-template-columns:1fr;gap:.45rem}.tpv-ticket-heading{flex-direction:column}.tpv-message{max-width:100%}.tpv-search{flex-wrap:wrap}.tpv-search>*{width:100%}}

/* Keep ticket controls readable when a theme applies a fixed input height. */
.tpv-form select{height:auto!important;min-height:3.15rem!important;line-height:1.3!important}
.tpv-search input[type=search],.tpv-search select{box-sizing:border-box;min-width:0;border:1px solid #b9cbd4;border-radius:7px;color:#183441;font:inherit;font-size:1rem!important;height:auto!important;line-height:1.3!important;min-height:3.15rem!important;padding:.6rem .7rem!important}
.tpv-search input[type=search]{display:block!important;flex:1 1 280px!important;width:auto!important}
.tpv-search select{flex:0 1 260px!important;width:auto!important}
@media(max-width:700px){.tpv-search>*{width:100%!important}.tpv-search select{flex-basis:100%!important}}

.tpv-conversation{display:flex;flex-direction:column;align-items:stretch}.tpv-conversation .tpv-message{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:none!important}.tpv-conversation .tpv-message.tpv-admin{align-self:stretch;margin-left:0!important}.tpv-attachment{width:100%;max-width:420px;margin:1rem auto 0;padding:.65rem;background:#fff;border:1px solid #d7e5e9;border-radius:12px;text-align:center}.tpv-attachment-preview{display:block;width:100%;margin:0 auto;overflow:hidden;border:1px solid #c9dce3;border-radius:8px;background:#fff}.tpv-attachment-preview img{display:block;max-width:100%;max-height:300px;width:auto;height:auto;margin:0 auto}.tpv-attachment-name{display:inline-block;margin-top:.55rem;color:#0b6f9e;font-size:.85rem;font-weight:700}
.tpv-attachment-preview{cursor:zoom-in}.tpv-image-modal{position:fixed;z-index:100000;inset:0;display:none;align-items:center;justify-content:center;padding:3.5rem 1.25rem 1.25rem;background:rgba(4,22,35,.88);cursor:zoom-out}.tpv-image-modal.is-open{display:flex}.tpv-image-modal img{display:block;max-width:90vw;max-height:85vh;width:auto;height:auto;border-radius:10px;box-shadow:0 20px 60px rgba(0,0,0,.45);cursor:auto}.tpv-image-modal-close{position:absolute;top:1rem;right:1rem;width:2.6rem;height:2.6rem;border:0;border-radius:50%;background:#fff;color:#173a4b;cursor:pointer;font-size:2rem;line-height:1;font-weight:400;box-shadow:0 4px 16px rgba(0,0,0,.25)}.tpv-image-modal-close:hover,.tpv-image-modal-close:focus{background:#dff3f8;color:#075d79;outline:0}
.tpv-logout-button{position:fixed;right:2rem;bottom:1.25rem;z-index:99999;display:inline-flex!important;align-items:center;justify-content:center;gap:.4rem;width:auto!important;min-width:0!important;max-width:max-content;padding:.55rem .85rem;border:1px solid #075a70;border-radius:9px;background:#08758c;color:#fff!important;box-shadow:0 5px 12px rgba(4,55,72,.18);font-size:.85rem;font-weight:800;line-height:1;white-space:nowrap;text-decoration:none}.tpv-logout-button .dashicons{width:17px;height:17px;font-size:17px}.tpv-logout-button:hover,.tpv-logout-button:focus{background:#065a73;color:#fff!important;outline:2px solid rgba(70,168,181,.55);outline-offset:2px}@media(max-width:700px){.tpv-logout-button{right:1rem;bottom:.85rem}}
.tpv-auth-prompt{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:960px;margin:1rem auto;padding:1rem 1.1rem;background:#fff0ef;border:1px solid #f1c4c0;border-left:4px solid #c43831;border-radius:10px;color:#3d2726}.tpv-auth-prompt p{margin:0;font-size:1rem}.tpv-login-button{display:inline-flex;align-items:center;gap:.4rem;flex:0 0 auto;padding:.6rem .9rem;border:1px solid #08758c;border-radius:8px;background:#08758c;color:#fff!important;font-weight:800;text-decoration:none}.tpv-login-button:hover,.tpv-login-button:focus{background:#065a73;color:#fff!important;outline:2px solid rgba(70,168,181,.55);outline-offset:2px}.tpv-login-button .dashicons{width:17px;height:17px;font-size:17px}@media(max-width:700px){.tpv-auth-prompt{align-items:stretch;flex-direction:column}.tpv-login-button{justify-content:center}}

/* Participants are a first-class part of a ticket, not an afterthought. */
.tpv-participants{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:1.25rem;max-width:960px;margin:1.5rem auto;padding:1.45rem 1.6rem;background:#f7fbfc;border:1px solid #cfe3e9;border-left:5px solid #0b6f9e;border-radius:14px;color:#173a4b}.tpv-participants h2{margin:.22rem 0 .8rem;color:#173a4b;font-size:1.15rem}.tpv-participants p{margin:.45rem 0}.tpv-participant-list{display:grid;gap:.5rem;margin:.85rem 0 0;padding:0;list-style:none}.tpv-participant-list li{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.6rem .75rem;background:#fff;border:1px solid #d9e8ed;border-radius:8px}.tpv-participant-list form{margin:0}.tpv-text-button{border:0;background:transparent;color:#a4362b;cursor:pointer;font:inherit;font-size:.85rem;font-weight:800;padding:.2rem}.tpv-text-button:hover{text-decoration:underline}.tpv-add-participant{align-self:start;padding:1rem;background:#fff;border:1px solid #d9e8ed;border-radius:10px}.tpv-add-participant label{display:block;color:#173a4b;font-size:.9rem;font-weight:800}.tpv-add-participant input,.tpv-required-participant input{box-sizing:border-box;width:100%;max-width:100%;margin-top:.55rem;background:#fbfdfe;border:1px solid #b9cbd4;border-radius:8px;color:#183441;font:inherit;padding:.75rem .85rem}.tpv-add-participant button{margin-top:.7rem;border:0;border-radius:8px;background:#0b6699;color:#fff;cursor:pointer;font:inherit;font-weight:800;padding:.7rem 1rem}.tpv-participants-empty,.tpv-participants-help{color:#607681;font-size:.88rem}.tpv-required-participant{padding:1rem;background:#f1f8f9;border:1px solid #8bb9c3;border-radius:9px}@media(max-width:700px){.tpv-participants{grid-template-columns:1fr;padding:1.2rem}.tpv-participant-list li{align-items:flex-start;flex-direction:column;gap:.4rem}}
.tpv-portal-head{background:linear-gradient(125deg,#075572 0%,#08758c 55%,#46a8b5 100%)}
.tpv-portal-head h1{color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.12)}
.tpv-portal-head p{color:#e8f7f8!important}
.tpv-portal-head .tpv-kicker{color:#bfeef0!important}
.tpv-outline-button{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.82);color:#fff!important}
.tpv-outline-button:hover,.tpv-outline-button:focus{background:#fff;color:#08758c!important}
.tpv-compose{border-top-color:#08758c}
.tpv-form button,.tpv-search button,.tpv-add-participant button{background:#08758c!important;box-shadow:0 4px 10px rgba(8,117,140,.18)}
.tpv-form button:hover,.tpv-form button:focus,.tpv-search button:hover,.tpv-search button:focus,.tpv-add-participant button:hover,.tpv-add-participant button:focus{background:#065a73!important}
.tpv-guidance span,.tpv-tag{background:#e6f5f6;color:#086278}
.tpv-ticket-code,.tpv-back-link,.tpv-attachment-name{color:#08758c}
.tpv-ticket-card:hover{border-color:#4fa4b2;box-shadow:0 8px 18px rgba(8,117,140,.13)}
.tpv-ticket-header,.tpv-participants{border-color:#c9e2e5}
.tpv-participants{background:#f5fbfb;border-left-color:#08758c}
.tpv-message{background:#f1f9fa;border-color:#d2e8ea}
.tpv-message.tpv-admin{background:#e6f5f3;border-color:#bee0dc}
.tpv-role{background:rgba(8,117,140,.1);color:#086278}
.tpv-attachments,.tpv-required-participant{background:#f4fbfb;border-color:#8fc6cc}
.tpv-file-picker{display:flex;align-items:center;gap:.75rem;margin-top:.7rem;min-width:0}
.tpv-file-picker-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.tpv-file-picker-button{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 auto;min-height:2.7rem;margin:0!important;padding:.55rem 1rem!important;background:#08758c;color:#fff!important;border:1px solid #08758c!important;border-radius:8px;box-shadow:0 3px 8px rgba(8,117,140,.16);cursor:pointer;font:inherit!important;font-size:.9rem!important;font-weight:800!important;line-height:1.2!important;transition:background .15s ease,border-color .15s ease}
.tpv-file-picker-button:hover,.tpv-file-picker-button:focus{background:#065a73!important;border-color:#065a73!important}
.tpv-file-picker-input:focus + .tpv-file-picker-button{outline:2px solid #46a8b5;outline-offset:3px}
.tpv-file-picker-name{min-width:0;color:#3f6470;font-size:.88rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.tpv-file-picker{align-items:flex-start;flex-direction:column;gap:.45rem}.tpv-file-picker-name{white-space:normal}}

/* Give the customer portal a comfortable desktop canvas without letting it overflow. */
.tpv-portal-head,.tpv-form,.tpv-search,.tpv-ticket-list,.tpv-ticket-header,.tpv-conversation,.tpv-guidance,.tpv-error,.tpv-success,.tpv-auth-prompt,.tpv-participants{width:calc(100% - 48px)!important;max-width:1280px!important;margin-left:auto!important;margin-right:auto!important}
body:has(.tpv-portal-head) .entry-content.is-layout-constrained,body:has(.tpv-form) .entry-content.is-layout-constrained,body:has(.tpv-search) .entry-content.is-layout-constrained{box-sizing:border-box;max-width:none!important;width:100%!important;padding-left:24px!important;padding-right:24px!important}
@media(max-width:700px){.tpv-portal-head,.tpv-form,.tpv-search,.tpv-ticket-list,.tpv-ticket-header,.tpv-conversation,.tpv-guidance,.tpv-error,.tpv-success,.tpv-auth-prompt,.tpv-participants{width:calc(100% - 28px)!important}body:has(.tpv-portal-head) .entry-content.is-layout-constrained,body:has(.tpv-form) .entry-content.is-layout-constrained,body:has(.tpv-search) .entry-content.is-layout-constrained{padding-left:14px!important;padding-right:14px!important}}

.tpv-assignee-label{display:inline-flex;align-items:center;max-width:100%;padding:.32rem .55rem;background:#e8f3f5;border-radius:999px;color:#236879;font-size:.78rem;font-weight:700;line-height:1.2}
.tpv-staff-badge{display:inline-flex;align-items:center;justify-content:center;width:1.18rem;height:1.18rem;border-radius:50%;background:#1f9d62;color:#fff;font-size:.76rem;font-weight:900;line-height:1;vertical-align:middle;box-shadow:0 0 0 2px #dff4e8}.tpv-staff-badge-icon{display:block;transform:translateY(-.02rem)}
.tpv-custom-login{box-sizing:border-box;width:100%;padding:4rem 1.25rem;background:#f5f9fa}
.tpv-custom-login-card{box-sizing:border-box;max-width:520px;margin:0 auto;padding:2rem 2.2rem;background:#fff;border:1px solid #dbe5ea;border-radius:16px;box-shadow:0 12px 28px rgba(12,59,82,.08)}
.tpv-custom-login-card h1{margin:.35rem 0 .5rem;color:#173a4b;font-size:2rem}.tpv-custom-login-card>p{margin:0 0 1.4rem;color:#607681}.tpv-custom-login-card form p{margin:0 0 1rem}.tpv-custom-login-card label{display:block;color:#173a4b;font-weight:800}.tpv-custom-login-card input[type=text],.tpv-custom-login-card input[type=password]{box-sizing:border-box;width:100%;margin-top:.45rem;padding:.72rem .8rem;border:1px solid #b9cbd4;border-radius:8px}.tpv-custom-login-card .login-remember{display:flex;align-items:center;gap:.5rem;font-weight:400}.tpv-custom-login-card .login-remember input{width:auto;margin:0}.tpv-custom-login-card input[type=submit]{border:0;border-radius:8px;background:#08758c;color:#fff;cursor:pointer;font:inherit;font-weight:800;padding:.75rem 1.15rem}.tpv-custom-login-card input[type=submit]:hover{background:#065a73}
