/* Use the same type, height and material as the calculator's other controls. */
html body :is(.calc-switcher,.workspace-input>.workspace-heading):has(.calculator-cards-button){display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap}
html body .calculator-cards-button,html body #calculatorCardsDialog :is(button,a.tbtn,label.tbtn){box-sizing:border-box;min-height:32px!important;padding:6px 9px!important;font:400 12px/18px var(--site-font,system-ui,sans-serif)!important;letter-spacing:normal!important;white-space:nowrap;color:#423321!important;border:1px solid #c8ad7c!important;border-radius:7px!important;background:linear-gradient(135deg,#faf4e8,#e6d7bc)!important;box-shadow:none!important;cursor:pointer;text-decoration:none}
html body .calculator-cards-button:focus-visible,html body #calculatorCardsDialog :is(button,a):focus-visible{outline:2px solid #98743f;outline-offset:2px}
html body .workspace-collapsed .calculator-cards-button{display:none!important}
html.calculator-home body #calculatorHome :is(#panel-petals,#panel-upayi)>.workspace-input:has(.calculator-cards-button){display:block!important}
/* The library fills the form's top row; both controls use the 24px calculator scale. */
html body :is(#formHost .calc-switcher,#calculatorHome .workspace-input>.workspace-heading,.unified-workspace .workspace-input>.workspace-heading):has(>.calculator-cards-button){gap:8px!important;flex-wrap:nowrap;align-items:center}
html body :is(#formHost .calc-switcher,#calculatorHome .workspace-input>.workspace-heading,.unified-workspace .workspace-input>.workspace-heading)>.calculator-cards-button{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important;height:24px!important;min-height:24px!important;padding:2px 8px!important;line-height:16px!important;border-radius:5px!important}
html body :is(#formHost .calc-switcher,#calculatorHome .workspace-input>.workspace-heading,.unified-workspace .workspace-input>.workspace-heading)>:is(.focus-toggle,.workspace-fold){flex:none;height:24px!important;min-height:24px!important;box-sizing:border-box}
html body #calculatorCardsDialog{box-sizing:border-box;width:min(1060px,calc(100vw - 24px));height:fit-content;max-width:none;max-height:calc(100dvh - 24px);padding:0;margin:auto;border:1px solid rgba(255,255,255,.9);border-radius:12px;background:#f5efe4!important;color:#332d25;box-shadow:0 18px 64px rgba(65,48,25,.22)}
html body #calculatorCardsDialog[open]{display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start}
#calculatorCardsDialog:not([open]){display:none!important}
#calculatorCardsDialog::backdrop{background:rgba(47,39,28,.3);backdrop-filter:blur(5px)}
.calculator-cards-heading{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid #dccdae}
html body #calculatorCardsDialog h2{margin:0;font:500 16px/22px var(--site-font,system-ui,sans-serif)!important}
html body #calculatorCardsDialog .calculator-cards-heading>button{height:24px!important;min-height:24px!important;padding:2px 8px!important;line-height:16px!important;border-radius:5px!important}
.calculator-cards-status{margin:12px 16px;font-size:13px}.calculator-cards-status:empty{display:none}
.calculator-cards-content{flex:0 1 auto;min-height:0;display:flex;flex-direction:column}.calculator-cards-content>a{align-self:flex-start;margin:0 16px 16px}
/* 17.11.2026: the table is drawn in the dialog itself (no iframe). */
.calculator-cards-content{overflow:hidden}
.calculator-cards-content>.calculator-cards-login{align-self:flex-start;margin:0 16px 16px}
.calculator-cards-toolbar{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 16px 0}
.calculator-cards-toolbar[hidden],.calculator-cards-table[hidden],.calculator-cards-empty[hidden]{display:none!important}
html body #calculatorCardsDialog .calculator-cards-toolbar :is(input,select){box-sizing:border-box;height:32px;padding:4px 8px;font:400 13px/20px var(--site-font,system-ui,sans-serif);color:#332d25;border:1px solid #c8ad7c;border-radius:7px;background:#fffaf1}
html body #calculatorCardsDialog .calculator-cards-toolbar input[type=search]{flex:1 1 220px;min-width:0}
html body #calculatorCardsDialog .calculator-cards-toolbar select{flex:0 1 180px;min-width:0}
.calculator-cards-spacer{flex:1 1 0}
html body #calculatorCardsDialog .calculator-cards-file{display:inline-flex;align-items:center}
.calculator-cards-count{flex:none;margin:8px 16px 0;font-size:12px;color:#6b5a43}.calculator-cards-count:empty{display:none}
.calculator-cards-table{flex:0 1 auto;min-height:0;overflow:auto;margin:8px 16px 16px;border:1px solid #dccdae;border-radius:8px;background:#fffaf1}
.calculator-cards-table table{width:100%;border-collapse:collapse;font-size:13px;line-height:18px}
.calculator-cards-table :is(th,td){padding:7px 10px;text-align:left;vertical-align:middle;border-bottom:1px solid #eadfca}
.calculator-cards-table tbody tr:last-child>*{border-bottom:0}
.calculator-cards-table thead th{position:sticky;top:0;z-index:1;font-weight:500;font-size:12px;color:#6b5a43;background:#f3eadb}
.calculator-cards-table tbody th{font-weight:500}
.calculator-cards-actions{white-space:nowrap;text-align:right!important;width:1%}
.calculator-cards-actions>*+*{margin-left:6px}
html body #calculatorCardsDialog .calculator-cards-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;padding:0!important;vertical-align:middle}
.calculator-cards-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.calculator-cards-confirm{font-size:12px;margin-right:2px}
.calculator-cards-empty{flex:none;margin:12px 16px 16px;font-size:13px;color:#6b5a43}
.calculator-cards-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:640px){
 .calculator-cards-table thead{display:none}
 .calculator-cards-table :is(table,tbody){display:block;width:100%}
 .calculator-cards-table tbody tr{display:block;position:relative;padding:8px 128px 8px 10px;border-bottom:1px solid #eadfca}
 .calculator-cards-table tbody tr:last-child{border-bottom:0}
 .calculator-cards-table tbody :is(th,td){padding:0;border:0}
 .calculator-cards-table tbody th{display:block}
 .calculator-cards-table tbody td:not(.calculator-cards-actions){display:inline;font-size:12px;color:#6b5a43}
 .calculator-cards-table tbody td:not(.calculator-cards-actions):not(:nth-last-child(2))::after{content:" · "}
 .calculator-cards-actions{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:auto}
 .calculator-cards-spacer{display:none}
}
html.cards-popup,html.cards-popup body{background:#f5efe4!important;min-height:0!important;padding-bottom:0!important}
html.cards-popup body :is(#siteUnifiedHeader,body>header,.skip,.account-heading,#accountTabs,#siteBottomNav,.floating-messenger,.mobile-nav,body>footer){display:none!important}
html.cards-popup :is(main,.account-layout,.account-shell){box-sizing:border-box;width:100%!important;max-width:none!important;margin:0!important;padding:12px!important}
html.cards-popup .account-panel:not(#panel-cards),html.cards-popup #panel-cards>.panel-head{display:none!important}
html.cards-popup #panel-cards{margin:0!important}
html.cards-popup #vedicRecords{display:none!important}
