/* ????????????????????????????????????????????????????
   website-view.css  —  Styles for Project/WebsiteView
   PDPortal / PublicDial Services
???????????????????????????????????????????????????? */

/* ?? Reset ?? */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: #f0f2f8; color: #333; min-height: 100vh; }

/* ??????????????????????????????????????
   TOPBAR
?????????????????????????????????????? */
.wv_topbar {
    background: #fff;
    color: #1a237e;
    padding: 0 20px;
    height: 44px;
    display: flex;
align-items: center;
    gap: 12px;
    border-bottom: 2px solid #e8eaf6;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.wv_topbar .logo        { display: flex; align-items: center; gap: 9px; }
.wv_topbar .logo_icon   {
    width: 28px; height: 28px; border-radius: 7px;
    background: linear-gradient(135deg, #1a237e, #283593);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wv_topbar .logo_icon i { font-size: 13px; color: #fff; }
.wv_topbar h1           { font-family: 'Sen', sans-serif; font-size: 14px; font-weight: 800; color: #1a237e; white-space: nowrap; }
.wv_topbar small        { font-size: 11px; color: #aaa; margin-left: 2px; font-weight: 400; }
.wv_topbar .spacer      { flex: 1; }

.wv_edit_link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
 background: #f0f2ff;
    color: #1a237e;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #c5cae9;
    transition: background .2s, color .2s, border-color .2s;
}
.wv_edit_link:hover { background: #e65100; color: #fff; border-color: #e65100; }

.wv_back_btn {
 display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border-radius: 7px;
background: #f0f2ff;
    color: #1a237e;
    font-size: 16px;
    text-decoration: none;
    border: 1.5px solid #c5cae9;
    flex-shrink: 0;
    transition: background .18s, color .18s;
}
.wv_back_btn:hover { background: #1a237e; color: #fff; border-color: #1a237e; }

/* ??????????????????????????????????????
   BODY LAYOUT
?????????????????????????????????????? */
.wv_body { display: flex; height: calc(100vh - 96px); overflow: hidden; }

/* ??????????????????????????????????????
   LEFT PANEL — Project & Page List
?????????????????????????????????????? */
.wv_left {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e0e3f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wv_left_head {
  padding: 14px 16px 10px;
    border-bottom: 1px solid #f0f1f8;
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wv_left_head i { color: #e65100; }

.wv_project_list { flex: 1; overflow-y: auto; }

/* ?? Project group header ?? */
.wv_proj_header {
    display: flex;
  align-items: center;
    gap: 10px;
    padding: 11px 16px;
 cursor: pointer;
    background: #f8f9fc;
    border-bottom: 1px solid #f0f1f8;
    transition: background .18s;
    user-select: none;
}
.wv_proj_header:hover          { background: #e8eaf6; }
.wv_proj_header.active  { background: #e8eaf6; border-left: 3px solid #1a237e; }

.wv_proj_icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a237e, #283593);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wv_proj_icon i   { font-size: 13px; color: #fff; }
.wv_proj_name { font-size: 13px; font-weight: 700; color: #1a237e; flex: 1; }
.wv_proj_count    { font-size: 10px; background: #e65100; color: #fff; padding: 1px 7px; border-radius: 10px; }
.wv_proj_arrow    { font-size: 11px; color: #aaa; transition: transform .2s; }
.wv_proj_header.open .wv_proj_arrow { transform: rotate(90deg); }

/* ?? Page list ?? */
.wv_page_list      { display: none; }
.wv_page_list.open { display: block; }

.wv_page_item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 24px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fc;
    font-size: 12.5px;
    color: #555;
    border-left: 3px solid transparent;
    transition: all .18s;
}
.wv_page_item:hover          { background: #fff3e0; color: #e65100; padding-left: 28px; }
.wv_page_item.active         { background: #fff3e0; color: #e65100; border-left-color: #e65100; font-weight: 700; }
.wv_page_item i              { font-size: 12px; color: #1a237e; flex-shrink: 0; }
.wv_page_item.active i{ color: #e65100; }

/* ??????????????????????????????????????
   RIGHT PANEL — Preview
?????????????????????????????????????? */
.wv_right { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ?? Preview toolbar ?? */
.wv_preview_head {
    height: 46px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e0e3f0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.fake_browser { display: flex; align-items: center; gap: 6px; margin-right: 10px; }
.fake_dot      { width: 10px; height: 10px; border-radius: 50%; }
.fake_dot.red     { background: #ff5f57; }
.fake_dot.yellow { background: #febc2e; }
.fake_dot.green          { background: #28c840; }

.wv_url_bar {
    flex: 1;
    background: #f4f5fb;
    border: 1px solid #e0e3f0;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 7px;
}
.wv_url_bar i    { color: #43a047; font-size: 11px; }
.wv_url_bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ?? Prev / Next buttons ?? */
.wv_prev_nav,
.wv_next_nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f4f5fb;
    border: 1px solid #e0e3f0;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all .18s;
  white-space: nowrap;
}
.wv_prev_nav:hover,
.wv_next_nav:hover      { background: #1a237e; color: #fff; border-color: #1a237e; }
.wv_prev_nav.disabled,
.wv_next_nav.disabled       { opacity: .35; pointer-events: none; }

.wv_page_badge {
    font-size: 11px;
    background: #e8eaf6;
    color: #1a237e;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ?? iframe wrapper ?? */
.wv_frame_wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding-left: 5px;
    padding-right: 250px;
}
#viewFrame { width: 100%; height: 100%; border: none; display: block; }

/* ?? Loading overlay ?? */
.wv_frame_loading {
    position: absolute;
    inset: 0;
    background: rgba(240,242,248,.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 14px;
    color: #888;
    z-index: 10;
}
.wv_frame_loading i { font-size: 36px; color: #1a237e; animation: wv-spin .8s linear infinite; }

@keyframes wv-spin { to { transform: rotate(360deg); } }

/* ?? Status bar ?? */
.wv_statusbar {
    height: 26px;
    flex-shrink: 0;
 background: #f8f9fc;
    border-top: 1px solid #e0e3f0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
    font-size: 11px;
    color: #aaa;
}
.wv_statusbar i { font-size: 10px; color: #e65100; }

/* ?? Empty state ?? */
.wv_empty {
    flex: 1;
  display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #bbb;
    text-align: center;
    padding: 40px;
}
.wv_empty i  { font-size: 56px; color: #e0e3f0; }
.wv_empty h3   { font-size: 18px; color: #999; }
.wv_empty p    { font-size: 13px; }

/* ?? Responsive ?? */
@media (max-width: 700px) {
    .wv_left { width: 200px; }
}
