/* Resource choices reuse the accepted home-actions rounded selection pattern.
   Adapted layout and selected colors; home-actions-LICENSE.txt. */
.resource-types{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:min(640px,100%);margin:0 auto;padding:0;}
.resource-type{position:relative;display:flex;align-items:center;justify-content:center;gap:11px;min-width:0;min-height:66px;padding:12px 20px;border:1px solid #e4e8ef;border-radius:14px;background:#fff;color:#687587;font:inherit;font-size:15px;font-weight:500;line-height:1.4;cursor:pointer;transition:background-color 160ms ease,border-color 160ms ease,color 160ms ease,box-shadow 160ms ease;}
.resource-type-icon{width:25px;height:25px;flex-shrink:0;}
.resource-type:hover{border-color:#bcc8dd;background:#f8faff;color:#3b5278;}
.resource-type[aria-pressed="true"]{border-color:#aabaff;background:#f0f4ff;color:#3155f5;box-shadow:0 2px 8px #3155f50a;}
.resource-type[aria-pressed="true"]::after{content:'';position:absolute;top:8px;right:8px;width:5px;height:5px;border-radius:50%;background:currentColor;}
.resource-type:focus-visible{outline:3px solid #8096f4;outline-offset:3px;}
body.home-view .resource-types{margin:32px auto 0;}
body.home-view #main .search{margin-top:18px;}
body:not(.home-view) .workspace>header{flex-direction:column;gap:16px;}
@media(max-width:600px){
 .resource-types{gap:8px;}
 .resource-type{flex-direction:column;gap:7px;min-height:76px;padding:10px 8px;border-radius:12px;font-size:13px;}
 .resource-type-icon{width:23px;height:23px;}
 body.home-view .resource-types{margin-top:26px;}
 body.home-view #main .search{margin-top:16px;}
}
@media(prefers-reduced-motion:reduce){.resource-type{transition:none;}}

/* Count preview: custom interaction, kept separate from the button label. */
.resource-count-preview{position:absolute;bottom:calc(100% + 10px);left:50%;z-index:20;display:flex;flex-direction:column;align-items:center;gap:4px;width:166px;padding:12px 16px;border:1px solid #dce4f5;border-radius:13px;background:#fff;color:#334155;box-shadow:0 8px 24px #23376314;visibility:hidden;opacity:0;transform:translate(-50%,4px);transition:opacity 150ms ease,transform 150ms ease,visibility 150ms;cursor:pointer;}
.resource-count-preview::after{content:'';position:absolute;bottom:-5px;left:calc(50% - 5px);width:8px;height:8px;border-right:1px solid #dce4f5;border-bottom:1px solid #dce4f5;background:#fff;transform:rotate(45deg);}
.resource-count-preview.is-visible{visibility:visible;opacity:1;transform:translate(-50%,0);}
.resource-count-caption{font-size:12px;font-weight:400;line-height:18px;color:#64748b;white-space:nowrap;}
.resource-count-total{display:flex;align-items:baseline;justify-content:center;gap:5px;font-size:12px;font-weight:400;color:#64748b;line-height:32px;}
.resource-count-number{min-width:3ch;font-size:28px;line-height:32px;letter-spacing:-.5px;font-weight:700;font-variant-numeric:tabular-nums;color:#3155f5;text-align:center;}
.resource-preview-names{font-size:15px;font-weight:600;line-height:23px;color:#3155f5;text-align:center;white-space:pre-line;overflow-wrap:anywhere;}
[data-resource-drafts] .resource-count-preview{width:248px;padding:12px;gap:8px;align-items:stretch;cursor:default;}
[data-resource-drafts] .resource-count-caption{text-align:left;padding:0 6px;font-size:12px;}
[data-resource-drafts] .resource-preview-names{display:flex;flex-direction:column;text-align:left;white-space:normal;font-size:13px;line-height:20px;}
.resource-preview-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 6px;}
.resource-preview-row+.resource-preview-row{border-top:1px solid #edf0f6;}
.resource-preview-row>span:first-child{min-width:0;}
.resource-preview-status{flex-shrink:0;padding:1px 6px;border-radius:5px;background:#f1f4f9;color:#7b879a;font-size:10px;font-weight:400;line-height:18px;}
@media(max-width:600px){.resource-count-preview{left:0;width:150px;transform:translateY(4px);}.resource-count-preview.is-visible{transform:translateY(0);}.resource-count-preview::after{left:36px;}}
@media(max-width:600px){.resource-type:nth-last-child(-n+2) .resource-count-preview{left:auto;right:0;}.resource-type:nth-last-child(-n+2) .resource-count-preview::after{left:auto;right:36px;}}
@media(max-width:600px){[data-resource-drafts] .resource-count-preview{width:220px;}}
@media(prefers-reduced-motion:reduce){.resource-count-preview{transition:opacity 150ms ease;transform:translateX(-50%);}.resource-count-preview.is-visible{transform:translateX(-50%);}}
@media(max-width:600px) and (prefers-reduced-motion:reduce){.resource-count-preview,.resource-count-preview.is-visible{transform:none;}}

/* Compact resource lists, adapted from the local cloud tutorial menu. */
.resource-choice-chevron{position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:12px;color:#8b97aa;line-height:1;}
.resource-type[aria-expanded="true"]{background:#f3f5fa;border-color:#d7dfed;}
.resource-type[aria-current="page"]{border-color:#aabaff;background:#f0f4ff;color:#3155f5;}
.resource-type[aria-expanded="true"] .resource-choice-chevron{transform:translateY(-50%) rotate(180deg);}
.resource-choice-menu{box-sizing:border-box;position:fixed;inset:auto;margin:0;width:280px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:8px;border:1px solid #e0e6f0;border-radius:13px;background:#fff;color:#516078;box-shadow:0 8px 26px #2438591a;text-align:left;}
.resource-choice-menu::backdrop{background:transparent;}
.resource-choice-heading{display:flex;align-items:center;gap:10px;box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:8px;background:#f3f5f9;color:#516078;font:inherit;font-size:14px;font-weight:550;text-align:left;cursor:pointer;}
.resource-choice-heading .resource-type-icon{width:19px;height:19px;}
.resource-choice-arrow{margin-left:auto;font-size:16px;}
.resource-choice-list{display:grid;gap:2px;margin:6px 4px 0;padding-top:6px;border-top:1px solid #edf0f6;}
.resource-choice-item{display:flex;align-items:center;gap:10px;box-sizing:border-box;width:100%;min-height:44px;padding:10px 8px;border:0;border-radius:7px;background:transparent;color:#36455d;text-align:left;text-decoration:none;font:inherit;font-size:13px;line-height:20px;}
.resource-choice-item .resource-type-icon{width:19px;height:19px;flex:0 0 19px;}
.resource-choice-name{min-width:0;overflow-wrap:anywhere;}
.resource-choice-status{margin-left:auto;flex-shrink:0;color:#9aa3b1;font-size:11px;white-space:nowrap;}
.resource-choice-item:disabled{color:#788599;cursor:default;}
.resource-choice-item[href]:hover,.resource-choice-all:hover{background:#f3f5fb;}
.resource-choice-all{display:block;margin:5px 4px 0;padding:9px 8px;border-top:1px solid #edf0f6;border-radius:0 0 7px 7px;color:#667b9d;text-align:right;text-decoration:none;font-size:12px;line-height:18px;}
.resource-choice-empty{padding:8px;color:#8b97aa;font-size:12px;}
.resource-choice-menu :is(a,button):focus-visible{outline:3px solid #94a9ef;outline-offset:1px;}
@media(max-width:600px){.resource-choice-chevron{top:10px;right:6px;transform:none;}.resource-type[aria-expanded="true"] .resource-choice-chevron{transform:rotate(180deg);}}
