/* ── Gatherova Resource Libraries ───────────────────────────────────────── */

/* ── Admin ─────────────────────────────────────────────────────────────── */
.gwp_resources_admin { padding: 24px; max-width: 1800px; }

.gwp_res_header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.gwp_res_header_title { display: flex; align-items: center; gap: 14px; }
.gwp_res_header_title > i { font-size: 32px; color: var(--accent1); }
.gwp_res_header_title h1 { font-size: 20px; font-weight: 600; margin: 0 0 2px; }
.gwp_res_header_title p  { font-size: 13px; color: #888; margin: 0; }

.gwp_res_loading { padding: 40px; text-align: center; color: #aaa; font-size: 15px; }
.gwp_res_loading i { font-size: 24px; }

.gwp_res_empty { padding: 60px 20px; text-align: center; color: #bbb; }
.gwp_res_empty i { font-size: 40px; display: block; margin-bottom: 10px; }
.gwp_res_empty p { font-size: 14px; }

.gwp_res_cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }

.gwp_res_card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 18px; display: flex; align-items: flex-start; gap: 14px; }
.gwp_res_card_icon { width: 42px; height: 42px; border-radius: 8px; background: #f0fdf4; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #2a9d90; flex-shrink: 0; }
.gwp_res_card_body { flex: 1; min-width: 0; }
.gwp_res_card_title { font-weight: 600; font-size: 14px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gwp_res_card_meta { font-size: 12px; color: #888; margin-bottom: 4px; }
.gwp_res_card_desc { font-size: 12px; color: #666; }
.gwp_res_card_actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.gwp_res_badge { font-size: 10px; padding: 2px 7px; border-radius: 12px; font-weight: 600; }
.gwp_res_badge_files { background: #e0f2fe; color: #0369a1; }
.gwp_res_badge_video { background: #fce7f3; color: #9d174d; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.gwp_btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; font-size: 13px; font-family: inherit; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #374151; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.gwp_btn:hover { background: #f9fafb; border-color: #9ca3af; }
.gwp_btn_primary { background: var(--accent1); color: #fff; border-color: var(--accent1); }
.gwp_btn_primary:hover { background: var(--gwp_accent2, #238578); border-color: var(--gwp_accent2, #238578); }
.gwp_btn_danger { color: #dc2626; border-color: #fecaca; }
.gwp_btn_danger:hover { background: #fef2f2; }
.gwp_btn_sm { padding: 4px 10px; font-size: 12px; }

/* ── Popups ─────────────────────────────────────────────────────────────── */
.gwp_res_popup_overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gwp_res_popup { background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 100%; max-width: 520px; max-height: 90vh; display: flex; flex-direction: column; }
.gwp_res_popup_wide { max-width: 860px; }
.gwp_res_popup_header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #f0f0f0; }
.gwp_res_popup_header h2 { font-size: 16px; font-weight: 600; margin: 0; }
.gwp_res_popup_close { background: none; border: none; font-size: 20px; color: #9ca3af; cursor: pointer; padding: 4px; display: flex; align-items: center; }
.gwp_res_popup_close:hover { color: #374151; }
.gwp_res_popup_body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.gwp_res_popup_footer { padding: 14px 22px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }

.gwp_res_field { margin-bottom: 16px; }
.gwp_res_field label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.gwp_res_field label small { font-weight: 400; color: #9ca3af; }
.gwp_res_field input[type="text"],
.gwp_res_field input[type="number"],
.gwp_res_field textarea { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; font-family: inherit; box-sizing: border-box; }
.gwp_res_field_hint { display: block; font-size: 11px; color: #9ca3af; margin-top: 3px; }
.gwp_res_field input:focus,
.gwp_res_field textarea:focus { outline: none; border-color: var(--accent1); box-shadow: 0 0 0 3px rgba(42,157,144,.15); }

.gwp_res_type_picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gwp_res_type_option { border: 2px solid #e5e7eb; border-radius: 8px; padding: 12px; cursor: pointer; transition: border-color .15s; }
.gwp_res_type_option:has(input:checked) { border-color: var(--accent1); background: #f0fdf4; }
.gwp_res_type_option input { display: none; }
.gwp_res_type_option span { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.gwp_res_type_option small { display: block; font-size: 11px; color: #6b7280; }

/* ── Video manager popup body ──────────────────────────────────────────── */
.gwp_res_videos_body { display: flex; gap: 0; padding: 0; }
.gwp_res_videos_left { width: 220px; flex-shrink: 0; border-right: 1px solid #f0f0f0; padding: 14px; overflow-y: auto; }
.gwp_res_videos_tree_label { font-size: 11px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.gwp_res_vtree_folder { padding: 6px 8px; border-radius: 6px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.gwp_res_vtree_folder:hover, .gwp_res_vtree_folder.active { background: var(--accent1); color: #fff; }
.gwp_res_vtree_sub { margin-left: 14px; border-left: 1px solid #e5e7eb; padding-left: 8px; }
.gwp_res_videos_right { flex: 1; padding: 14px; overflow-y: auto; }

.gwp_res_ved_header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gwp_res_ved_row { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 8px; }
.gwp_res_ved_row_grip { color: #9ca3af; padding-top: 2px; cursor: grab; }
.gwp_res_ved_row_fields { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.gwp_res_ved_row_fields input,
.gwp_res_ved_row_fields textarea { width: 100%; padding: 5px 8px; border: 1px solid #d1d5db; border-radius: 5px; font-size: 12px; font-family: inherit; }
.gwp_res_ved_row_del { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 16px; padding: 2px; opacity: .6; }
.gwp_res_ved_row_del:hover { opacity: 1; }
.gwp_res_vid_title { font-weight: 600; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
#gwp_res_toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1f2937; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 500; opacity: 0; transition: all .25s; z-index: 99999; pointer-events: none; }
#gwp_res_toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.gwp_res_toast_success { background: #166534; }
.gwp_res_toast_error   { background: #991b1b; }

/* ── Front-end viewer ───────────────────────────────────────────────────── */
#gwp_res_viewer { display: flex; min-height: 70vh; background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden; }

#gwp_res_sidebar { width: 240px; flex-shrink: 0; border-right: 1px solid #e5e7eb; background: #f9fafb; padding: 16px 12px; overflow-y: auto; }

.gwp_res_nav_item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 2px; transition: background .1s; }
.gwp_res_nav_item:hover { background: #e5e7eb; }
.gwp_res_nav_item.active { background: var(--accent1); color: #fff; }
.gwp_res_nav_icon { font-size: 16px; }

#gwp_res_main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

#gwp_res_content_header { padding: 18px 22px 0; border-bottom: 1px solid #f0f0f0; }
.gwp_res_set_title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.gwp_res_set_desc { font-size: 13px; color: #6b7280; margin-bottom: 10px; }
.gwp_res_notice { background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 10px 14px; font-size: 12px; color: #92400e; margin-bottom: 12px; }

#gwp_res_browser { display: flex; flex: 1; min-height: 0; }

#gwp_res_tree { width: 220px; flex-shrink: 0; border-right: 1px solid #f0f0f0; padding: 14px 10px; overflow-y: auto; }

.gwp_res_tree_list { list-style: none; margin: 0; padding: 0; }
.gwp_res_tree_root { padding: 0; }
.gwp_res_tree_item { margin-bottom: 2px; }
.gwp_res_tree_label { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.gwp_res_tree_label:hover { background: #f3f4f6; }
.gwp_res_tree_label.active { background: var(--accent1); color: #fff; }
.gwp_res_tree_icon { font-size: 15px; color: #d97706; }
.gwp_res_tree_label.active .gwp_res_tree_icon { color: #fff; }
.gwp_res_tree_count { font-size: 11px; color: #9ca3af; margin-left: auto; }
.gwp_res_tree_label.active .gwp_res_tree_count { color: rgba(255,255,255,.7); }
.gwp_res_tree_chev { font-size: 11px; color: #9ca3af; flex-shrink: 0; width: 14px; cursor: pointer; }
.gwp_res_tree_chev:hover { color: #374151; }
.gwp_res_tree_label.active .gwp_res_tree_chev { color: rgba(255,255,255,.7); }
.gwp_res_tree_spacer { display: inline-block; width: 14px; flex-shrink: 0; }
.gwp_res_tree_sub { display: none; margin-left: 12px; border-left: 1px solid #e5e7eb; padding-left: 8px; }
.gwp_res_tree_sub.open { display: block; }
.gwp_res_tree_list .gwp_res_tree_list { margin: 0; border: none; padding: 0; }

#gwp_res_content_area { flex: 1; padding: 16px 20px; overflow-y: auto; }

.gwp_res_folder_actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }

/* ── Admin browse view ──────────────────────────────────────────────────── */
.gwp_res_admin_browse { }
.gwp_res_admin_browse_header { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; border-bottom: 1px solid #e5e7eb; margin-bottom: 14px; flex-wrap: wrap; }
.gwp_res_admin_browse_title { flex: 1; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.gwp_res_admin_browse_actions { display: flex; gap: 8px; }
.gwp_res_admin_browse_desc { font-size: 13px; color: #6b7280; margin: 0 0 12px; }

/* ── Unified folder content ─────────────────────────────────────────────── */
.gwp_res_videos_section { margin-top: 20px; }
.gwp_res_section_header { font-size: 12px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }

/* ── Video overlay icon (resources-specific, not in output.css) ── */
.gwp_res_vid_play_icon { font-size: 28px; color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ── Video card grid ────────────────────────────────────────────────────── */
.gwp_res_vid_grid { display: flex; flex-wrap: wrap; }

/* ── Vimeo player popup ──────────────────────────────────────────────────── */
.gwp_res_vidplay_modal { width: 90vw; max-width: 900px; }
.gwp_res_vidplay_wrap { position: relative; width: 100%; padding-bottom: 56.25%; background: #000; border-radius: 0 0 6px 6px; overflow: hidden; }
.gwp_res_vidplay_wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* ── Curriculum card integration ────────────────────────────────────────── */
.gwp_res_cur_icon { background: #dbeafe !important; }
.gwp_res_cur_icon i { color: #1d4ed8 !important; }
.gwp_res_cur_badge { background: #dbeafe; color: #1d4ed8; border-radius: 12px; font-size: 10px; padding: 2px 8px; font-weight: 600; }

.gwp_res_file_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gwp_res_file_card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 8px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.gwp_res_file_card:hover { border-color: var(--accent1); box-shadow: 0 2px 8px rgba(42,157,144,.15); }
.gwp_res_file_icon { width: 36px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.gwp_res_fi_pdf { background: #fee2e2; color: #dc2626; }
.gwp_res_fi_doc { background: #dbeafe; color: #2563eb; }
.gwp_res_fi_ppt { background: #ffedd5; color: #ea580c; }
.gwp_res_fi_xls { background: #dcfce7; color: #16a34a; }
.gwp_res_fi_img { background: #d1fae5; color: #059669; }
.gwp_res_fi_vid { background: #fce7f3; color: #9d174d; }
.gwp_res_fi_aud { background: #f3e8ff; color: #7c3aed; }
.gwp_res_fi_def { background: #f3f4f6; color: #6b7280; }
.gwp_res_file_info { flex: 1; min-width: 0; }
.gwp_res_file_name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gwp_res_file_meta { font-size: 11px; color: #9ca3af; margin-top: 1px; }
.gwp_res_file_dl { font-size: 16px; color: #9ca3af; flex-shrink: 0; }
.gwp_res_file_card:hover .gwp_res_file_dl { color: var(--accent1); }


.gwp_res_muted { color: #9ca3af; font-size: 13px; padding: 20px 0; }

@media (max-width: 700px) {
    #gwp_res_viewer { flex-direction: column; }
    #gwp_res_sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e5e7eb; }
    #gwp_res_browser { flex-direction: column; }
    #gwp_res_tree { width: 100%; border-right: none; border-bottom: 1px solid #f0f0f0; }
    .gwp_res_cards { grid-template-columns: 1fr; }
    .gwp_res_popup_wide { max-width: 95vw; }
    .gwp_res_videos_body { flex-direction: column; }
    .gwp_res_videos_left { width: 100%; border-right: none; border-bottom: 1px solid #f0f0f0; }
}
