/*
 * File Sharing Pro - client portal (.fsp-portal, inside the customers theme)
 * and standalone PUBLIC pages (.fsp-public: branded download / file-request).
 * The public look is deliberately more standalone: deep slate backdrop with a
 * soft brand glow, one luminous card, generous type. --fsp-brand is injected
 * per install (Settings -> Branding).
 */

/* ---------------------------------------------------------------- shared type tints */
.fsp-t-folder { background: #FFF4DC; color: #F6B73C; }
.fsp-t-image  { background: #EFE7FD; color: #8B5CF6; }
.fsp-t-pdf    { background: #FDE8E8; color: #E74C3C; }
.fsp-t-doc    { background: #E3EFFD; color: #2B6CB0; }
.fsp-t-sheet  { background: #E3F8EC; color: #2F9E63; }
.fsp-t-slide  { background: #FDEEE3; color: #DD6B20; }
.fsp-t-archive{ background: #FFF4DC; color: #B7791F; }
.fsp-t-audio  { background: #E6FAF7; color: #0FA3A3; }
.fsp-t-video  { background: #FDE7F1; color: #D53F8C; }
.fsp-t-code   { background: #E8EDF5; color: #4A5568; }
.fsp-t-text   { background: #EEF1F5; color: #6B7683; }
.fsp-t-design { background: #F3E8FD; color: #A855F7; }
.fsp-t-other  { background: #EEF1F5; color: #6B7683; }

/* ---------------------------------------------------------------- client portal */
.fsp-portal { padding: 6px 0 30px; }
.fsp-portal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.fsp-portal-title { margin: 0 0 4px; font-weight: 600; }
.fsp-portal-title .fa-cloud { color: var(--file_sharing_pro-primary, #03A9F4); }
.fsp-portal-sub { color: #6B7683; margin: 0; }
.fsp-p-crumbs { font-size: 12.5px; color: #6B7683; margin-bottom: 6px; }
.fsp-p-crumbs a { color: #6B7683; }
.fsp-p-crumbs a:hover { color: #0288D1; }
.fsp-p-crumbs span { margin: 0 4px; }

.fsp-p-sec { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6B7683; font-weight: 700; margin: 26px 0 12px; }

.fsp-p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.fsp-p-card { position: relative; display: block; background: #fff; border: 1px solid #E4E8EE; border-radius: 14px; padding: 16px 12px 12px; text-align: center; color: #1F2733; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.fsp-p-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,24,40,.10); text-decoration: none; color: #1F2733; }
.fsp-p-thumb { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.fsp-p-name { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsp-p-meta { font-size: 11px; color: #6B7683; margin-top: 2px; }
.fsp-p-actions { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.fsp-p-actions a { width: 30px; height: 30px; line-height: 28px; border: 1px solid #E4E8EE; border-radius: 8px; color: #6B7683; transition: all .15s; }
.fsp-p-actions a:hover { color: #0288D1; border-color: #03A9F4; text-decoration: none; }

.fsp-p-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed rgba(3,169,244,.5); background: rgba(3,169,244,.05); border-radius: 16px; padding: 28px 16px; cursor: pointer; transition: all .15s; text-align: center; width: 100%; }
.fsp-p-drop:hover { background: rgba(3,169,244,.1); border-color: #03A9F4; }
.fsp-p-drop i { font-size: 30px; color: #03A9F4; }
.fsp-p-drop strong { font-size: 15px; }
.fsp-p-drop span { font-size: 12px; color: #6B7683; }
.fsp-p-drop input[type=file] { display: none; }
.fsp-p-queue { margin-top: 12px; text-align: center; }
.fsp-p-queue ul { list-style: none; padding: 0; margin: 0 0 12px; font-size: 12.5px; color: #4A5568; }
.fsp-p-queue li { padding: 3px 0; border-bottom: 1px dashed #E4E8EE; }

.fsp-p-check { position: absolute; top: 8px; left: 8px; margin: 0; cursor: pointer; }
.fsp-p-check input { width: 16px; height: 16px; accent-color: #03A9F4; cursor: pointer; }
.fsp-p-zipbtn { position: fixed; right: 24px; bottom: 24px; z-index: 90; border-radius: 999px; padding: 12px 22px; box-shadow: 0 10px 26px rgba(3,169,244,.45); }

.fsp-p-empty { text-align: center; padding: 60px 20px; color: #6B7683; }
.fsp-p-empty-art { width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 26px; background: linear-gradient(135deg, #E1F5FE, #fff); border: 1px solid #E4E8EE; display: flex; align-items: center; justify-content: center; font-size: 34px; color: #03A9F4; }

/* ---------------------------------------------------------------- public pages */
body.fsp-public { margin: 0; min-height: 100vh; font-family: 'Roboto', -apple-system, 'Segoe UI', sans-serif; background: #0D1522; color: #E8EDF5; display: flex; flex-direction: column; }
.fsp-pub-bg { position: fixed; inset: 0; z-index: 0; background:
  radial-gradient(560px 380px at 18% 8%, color-mix(in srgb, var(--fsp-brand, #03A9F4) 22%, transparent), transparent 70%),
  radial-gradient(680px 460px at 88% 92%, color-mix(in srgb, var(--fsp-brand, #03A9F4) 14%, transparent), transparent 72%),
  linear-gradient(160deg, #0D1522 0%, #101B2E 55%, #0D1522 100%); }
.fsp-pub-bg::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 26px 26px; }

.fsp-pub-wrap { position: relative; z-index: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 34px 18px 20px; display: flex; flex-direction: column; min-height: 100vh; box-sizing: border-box; }
.fsp-pub-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.fsp-pub-brand img { max-height: 42px; max-width: 220px; }
.fsp-pub-brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--fsp-brand, #03A9F4); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px color-mix(in srgb, var(--fsp-brand, #03A9F4) 45%, transparent); }
.fsp-pub-brand-mark .fsp-ico-cloud { width: 18px; height: 12px; background: #fff; border-radius: 8px 8px 3px 3px; position: relative; display: block; }
.fsp-pub-brand-mark .fsp-ico-cloud::before { content: ""; position: absolute; top: -6px; left: 3px; width: 9px; height: 9px; background: #fff; border-radius: 50%; }
.fsp-pub-brand-name { font-weight: 700; font-size: 16px; letter-spacing: .01em; }

.fsp-pub-card { background: rgba(255,255,255,.97); color: #1F2733; border-radius: 22px; padding: 34px 34px 30px; box-shadow: 0 30px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); animation: fspPubIn .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes fspPubIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.fsp-pub-narrow { max-width: 460px; margin: 0 auto; text-align: center; width: 100%; box-sizing: border-box; }

.fsp-pub-file { text-align: center; }
.fsp-pub-thumb { width: 88px; height: 88px; border-radius: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.fsp-pub-ext { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.fsp-pub-name { font-size: 21px; font-weight: 700; margin: 0 0 10px; word-break: break-word; }
.fsp-pub-chips { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fsp-chip { background: #EEF1F5; color: #4A5568; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 500; }
.fsp-pub-note { color: #6B7683; font-size: 14px; line-height: 1.55; margin: 0 auto 20px; max-width: 480px; }
.fsp-pub-error { color: #E74C3C; font-size: 13px; font-weight: 500; margin: -8px 0 14px; }

.fsp-pub-preview { margin: 0 auto 22px; }
.fsp-pub-preview img { max-width: 100%; max-height: 320px; border-radius: 14px; box-shadow: 0 12px 34px rgba(16,24,40,.18); }

.fsp-pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--fsp-brand, #03A9F4); color: #fff; border: 0; border-radius: 14px; padding: 14px 30px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s, filter .12s; box-shadow: 0 10px 26px color-mix(in srgb, var(--fsp-brand, #03A9F4) 45%, transparent); font-family: inherit; }
.fsp-pub-btn:hover { transform: translateY(-1px); filter: brightness(1.06); color: #fff; text-decoration: none; }
.fsp-pub-btn.ghost { background: transparent; color: #4A5568; box-shadow: none; border: 1px solid #D5DBE4; margin-left: 8px; }
.fsp-pub-btn.ghost:hover { color: #1F2733; border-color: #9AA5B4; }
.fsp-pub-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.fsp-pub-folderhead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.fsp-pub-folderhead .fsp-pub-thumb { margin: 0; width: 66px; height: 66px; border-radius: 18px; }
.fsp-pub-folderhead > div { flex: 1; min-width: 200px; }
.fsp-pub-folderhead .fsp-pub-chips { justify-content: flex-start; margin-bottom: 0; }
.fsp-pub-folderhead .fsp-pub-name { margin-bottom: 6px; font-size: 19px; }

.fsp-pub-list { list-style: none; margin: 18px 0 0; padding: 0; }
.fsp-pub-list li { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; transition: background .12s; }
.fsp-pub-list li:hover { background: #F6F8FB; }
.fsp-pub-list li + li { border-top: 1px solid #EEF1F5; }
.fsp-pub-mini { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: none; letter-spacing: .03em; }
.fsp-pub-list-name { flex: 1; font-size: 14px; font-weight: 500; word-break: break-word; }
.fsp-pub-list-size { color: #6B7683; font-size: 12.5px; white-space: nowrap; }
.fsp-pub-list-dl { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #E4E8EE; display: flex; align-items: center; justify-content: center; color: #4A5568; transition: all .15s; flex: none; }
.fsp-pub-list-dl:hover { color: var(--fsp-brand, #03A9F4); border-color: var(--fsp-brand, #03A9F4); }
.fsp-pub-list-empty { color: #6B7683; justify-content: center; }

.fsp-pub-lock { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--fsp-brand, #03A9F4) 12%, #fff); color: var(--fsp-brand, #03A9F4); }
.fsp-pub-lock.muted { background: #EEF1F5; color: #6B7683; }
.fsp-pub-lock.success { background: #E3F8EC; color: #2F9E63; }

.fsp-pub-form { display: flex; flex-direction: column; gap: 12px; }
.fsp-pub-input { border: 1px solid #D5DBE4; border-radius: 12px; padding: 13px 16px; font-size: 15px; font-family: inherit; text-align: center; transition: all .15s; }
.fsp-pub-input:focus { outline: 0; border-color: var(--fsp-brand, #03A9F4); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fsp-brand, #03A9F4) 14%, transparent); }

.fsp-pub-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed color-mix(in srgb, var(--fsp-brand, #03A9F4) 55%, #D5DBE4); background: color-mix(in srgb, var(--fsp-brand, #03A9F4) 5%, #fff); border-radius: 16px; padding: 26px 16px; cursor: pointer; transition: all .15s; color: var(--fsp-brand, #03A9F4); }
.fsp-pub-drop:hover { background: color-mix(in srgb, var(--fsp-brand, #03A9F4) 10%, #fff); }
.fsp-pub-drop strong { color: #1F2733; font-size: 15px; }
.fsp-pub-drop span { color: #6B7683; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fsp-pub-drop input[type=file] { display: none; }

.fsp-pub-approve { margin-top: 26px; border-top: 1px solid #EEF1F5; padding-top: 20px; }
.fsp-pub-approve-title { font-weight: 600; margin-bottom: 12px; }
.fsp-pub-approve-btns { display: flex; gap: 10px; justify-content: center; }
.fsp-pub-btn.ok { background: #2F9E63; box-shadow: 0 10px 26px rgba(47,158,99,.4); }
.fsp-pub-btn.no { background: #E74C3C; box-shadow: 0 10px 26px rgba(231,76,60,.4); }

/* portal file detail page */
.fsp-p-file { max-width: 720px; }
.fsp-p-comments { list-style: none; margin: 0 0 16px; padding: 0; }
.fsp-p-comments li { background: #fff; border: 1px solid #E4E8EE; border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; }
.fsp-p-comments li.staff { border-left: 3px solid #03A9F4; }
.fsp-p-comments .who { font-weight: 600; font-size: 12.5px; }
.fsp-p-comments .when { color: #6B7683; font-size: 11px; margin-left: 6px; }
.fsp-p-comments p { margin: 4px 0 0; font-size: 13.5px; }
.fsp-p-approvebar { display: flex; gap: 10px; margin: 14px 0; }

.fsp-pub-foot { text-align: center; color: rgba(232,237,245,.45); font-size: 12px; padding: 26px 0 8px; margin-top: auto; }

@media (max-width: 560px) {
  .fsp-pub-card { padding: 26px 20px 24px; border-radius: 18px; }
  .fsp-pub-btn.ghost { margin-left: 0; margin-top: 8px; }
  .fsp-pub-folderhead { flex-direction: column; align-items: flex-start; }
}
