/* KlubPoint Komunikacia - konsolidovana produkcna vrstva */
.communication-tabs{display:flex;gap:8px;overflow:auto;margin:0 0 18px;padding-bottom:3px;scrollbar-width:none}
.communication-tabs::-webkit-scrollbar{display:none}
.communication-tabs button{min-height:42px;padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;font-weight:800;white-space:nowrap}
.communication-tabs button.active{border-color:var(--red);background:var(--red);color:#fff}
.communication-content{display:grid;gap:16px}
.communication-tag-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.communication-tag-groups h3{margin-top:0}
.communication-tag{width:100%;display:grid;gap:2px;padding:10px;border:0;border-bottom:1px solid #eee;border-radius:9px;background:transparent;text-align:left}
.communication-tag code{color:var(--red-dark);font-weight:800}
.communication-tag span{color:var(--muted);font-size:13px}
.communication-tag.copied{background:var(--green-soft)}
.communication-error{display:block;max-width:320px;margin-top:4px;color:var(--red-dark);white-space:normal}
.communication-settings{max-width:680px}
.communication-settings .notice{margin-top:14px}
.communication-content textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}
.communication-filters{padding:14px;margin-bottom:14px}
.communication-filter-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.communication-filter-row .search{min-width:280px;flex:1}
.communication-filter-row input,.communication-filter-row select,.communication-filter-row .btn{min-height:42px}
.communication-filter-count{margin-top:9px;color:var(--muted);font-size:13px}
.communication-filter-count b{color:var(--ink)}
.communication-table{position:relative;max-height:72vh;overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable;-webkit-overflow-scrolling:touch}
.communication-table table{min-width:760px;border-collapse:separate;border-spacing:0}
.communication-table thead th{position:sticky;top:0;z-index:14;background:#fafafa;box-shadow:0 1px 0 var(--line),0 5px 10px rgba(15,23,42,.05)}
.communication-table tbody tr:hover{background:#fff9fa}
.communication-actions-cell{width:104px;min-width:104px}
.communication-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:7px;white-space:nowrap}
.communication-action{display:inline-grid;place-items:center;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;padding:0;border:1px solid #d9dde3;border-radius:10px;background:#fff;color:#344054;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .15s,box-shadow .15s}
.communication-action svg{display:block;width:18px;height:18px;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important;pointer-events:none}
.communication-action:hover{background:#f4f5f7;border-color:#aeb4bd;transform:translateY(-1px);box-shadow:0 4px 10px rgba(16,24,40,.08)}
.communication-action:focus-visible{outline:3px solid rgba(213,31,45,.2);outline-offset:2px}
.template-editor{height:210px!important;min-height:180px!important;max-height:260px!important;overflow:auto}
.template-reference{display:block!important;height:auto!important;min-height:64px!important;max-height:none!important;margin:16px 0!important;overflow:visible!important;border:1px solid #cbd5e1!important;border-radius:14px!important;background:#f8fafc!important}
.template-reference>summary{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr) 24px!important;align-items:center;width:100%;min-height:62px;padding:10px 14px 10px 16px;list-style:none;cursor:pointer;color:#111827;background:#f8fafc;border-radius:13px}
.template-reference>summary::-webkit-details-marker{display:none}
.template-reference>summary>span{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0}
.template-reference>summary b{display:block;color:#111827;font-size:14px;font-weight:800;line-height:20px;white-space:normal}
.template-reference>summary small{display:block;color:#667085;font-size:12px;font-weight:500;line-height:17px;white-space:normal}
.template-reference>summary::after{content:'⌄';display:grid;place-items:center;width:24px;height:24px;color:#111827;font-size:20px;font-weight:900;line-height:1;transition:transform .18s}
.template-reference[open]>summary{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:1px solid #dbe2ea}
.template-reference[open]>summary::after{transform:rotate(180deg)}
.template-reference-body{display:block;height:auto;max-height:none;padding:14px 16px 16px;overflow:visible;color:#111827;background:#f8fafc}
.template-reference:not([open])>.template-reference-body{display:none}
.template-reference-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:0 0 14px}
.template-reference-head div{display:grid;gap:4px}
.template-reference-head small{color:var(--muted)}
.template-reference input[readonly],.template-reference textarea[readonly]{background:#eef2f6;color:#475569;cursor:not-allowed}
.template-reference textarea[readonly]{min-height:240px}
.template-form-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.template-test-preview{margin:12px 0 16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:#fff}
.template-test-preview>b{display:block;margin-bottom:12px}
.template-test-preview>div{padding:18px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa;overflow-wrap:anywhere}
#templateForm>.field,#templateForm>.check-row,#templateForm>.template-reference,#templateForm>p,#templateForm>.template-form-actions{flex:0 0 auto!important;min-height:0!important}
@media(max-width:760px){
 .communication-filter-row{display:grid;grid-template-columns:1fr}
 .communication-filter-row>*{width:100%}
 .communication-filter-row .search{min-width:0}
 .communication-table{max-height:none!important;overflow:visible!important;border:0!important;background:transparent!important;box-shadow:none!important;scrollbar-gutter:auto}
 .communication-table table{min-width:0!important;width:100%!important}
 .communication-table thead th{position:static!important;top:auto!important}
 .communication-table tbody tr{border-left:4px solid var(--red)}
 .communication-actions-cell{width:100%!important;min-width:0!important}
 .communication-action{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 .communication-tag-groups{grid-template-columns:1fr}
 .communication-settings{max-width:none}
}
@media(max-width:700px){
 .communication-tabs{margin-left:-4px;margin-right:-4px}
 .template-editor{height:180px!important;min-height:160px!important}
 .template-form-actions{grid-template-columns:1fr}
 .template-reference{min-height:58px!important;margin-top:14px!important}
 .template-reference>summary{min-height:56px;padding:8px 10px 8px 12px}
 .template-reference-body{padding:12px}
 .template-reference-head{flex-direction:column}
 .template-reference-head .btn{width:100%}
}
