/* ================================== */
/* File: css/style.css                */
/* Stylesheet chính cho Win10 Sim     */
/* Location: Vietnam                  */
/* Date: Saturday, April 26, 2025      */
/* ================================== */

/* --- Reset và Global Styles --- */
:root {
    /* Giá trị mặc định - sẽ bị ghi đè bởi style inline trong index.php */
    --desktop-bg: url('../images/default-background.jpg');
    --desktop-bg-size: cover;
    --desktop-bg-repeat: no-repeat;
    --desktop-bg-position: center center;
    --desktop-icon-container-width: 96px;
    --desktop-icon-container-height: 96px;
    --taskbar-icon-width: 24px;
    --taskbar-icon-height: 24px;
    --start-menu-tile-min-width: 80px;
    --start-menu-tile-min-height: 80px;
    --taskbar-bg: rgba(32, 32, 32, 0.9); /* Màu tối hơn mặc định */
    --window-header-bg: rgba(238, 238, 238, 1); /* Sáng hơn mặc định */
    /* Thêm các biến màu khác nếu cần */
     --accent-color: #0078d4; /* Màu nhấn Windows */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #000; /* Nền đen khi ảnh nền chưa tải */
    overflow: hidden;
    user-select: none;
    font-size: 14px;
    color: #212529;
    min-height: 100vh;
}

* { box-sizing: border-box; }
a { text-decoration: none; color: #0078d4; }
a:hover { text-decoration: underline; }


/* --- Loading Screen --- */
#loading-screen {
    position: fixed; inset: 0; background-color: #eff6fc;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999; opacity: 1; transition: opacity 0.5s ease-out .1s; /* Delay nhẹ */
}
.windows-logo { width: 50px; height: 50px; background-color: #0078d4; margin-bottom: 20px; animation: logo-spin 2s linear infinite; }
img.loading-logo { max-width: 80px; max-height: 80px; margin-bottom: 20px; object-fit: contain; animation: logo-pulse 1.5s infinite ease-in-out; }
@keyframes logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes logo-pulse { 0%, 100% { transform: scale(1); opacity: 0.8;} 50% { transform: scale(1.08); opacity: 1;} }
#loading-screen p { font-size: 1.1em; color: #005a9e; margin-top: 0; }
#loading-screen p.db-error { color: #dc3545; font-size: 0.9em; margin-top: 10px; padding: 0 15px; text-align: center;}
#loading-screen p.db-error i { margin-right: 5px; }


/* --- Desktop --- */
#desktop {
    position: absolute; top: 0; left: 0; width: 100%; height: calc(100vh - 40px);
    box-sizing: border-box; display: flex; flex-direction: column;
    flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 10px;
    overflow: hidden; /* Ẩn scroll desktop */
    /* Sử dụng CSS Variables */
    background-image: var(--desktop-bg, url('../images/default-background.jpg'));
    background-size: var(--desktop-bg-size, cover);
    background-repeat: var(--desktop-bg-repeat, no-repeat);
    background-position: var(--desktop-bg-position, center center);
    transition: background-image 0.7s ease-in-out;
}

/* --- Desktop Icon (và các icon tương tự) --- */
.desktop-icon {
    width: var(--desktop-icon-container-width, 96px);
    height: var(--desktop-icon-container-height, 96px);
    color: #fff; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); padding: 5px;
    border-radius: 4px; text-align: center; cursor: pointer; display: flex;
    flex-direction: column; justify-content: flex-start; align-items: center;
    transition: background-color 0.1s ease, transform 0.1s ease;
    background-color: transparent; border: 1px solid transparent; overflow: hidden;
}
.desktop-icon:hover { background-color: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); }
.desktop-icon:active { background-color: rgba(255, 255, 255, 0.25); transform: scale(0.97); }

/* Kích thước nội dung bên trong desktop icon */
.desktop-icon i, .desktop-icon img {
    /* Chiều cao chiếm khoảng 50-60% container */
    font-size: min(48px, calc(var(--desktop-icon-container-height, 96px) * 0.4));
    width: calc(var(--desktop-icon-container-width, 96px) - 20px);
    max-height: calc(var(--desktop-icon-container-height, 96px) - 45px);
    margin-bottom: 5px; display: block; object-fit: contain;
}
.desktop-icon i { color: #fff; }
.desktop-icon p { font-size: 0.85em; margin:0px; padding-top: 2px; width: 100%; word-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; text-align: center; }

/* Icon danh mục đặc biệt */
.desktop-icon.category-icon i, .app-tile.category-tile i { color: #ffe187; /* Màu vàng thư mục */ }


/* --- Taskbar --- */
#taskbar {
    background-color: var(--taskbar-bg, rgba(32, 32, 32, 0.9)); /* Nền từ biến */
    position: fixed; bottom: 0; left: 0; width: 100%; height: 40px;
    border-top: 1px solid rgba(180, 180, 180, 0.4); display: flex;
    align-items: stretch; justify-content: space-between; padding: 0;
    box-sizing: border-box; z-index: 100; box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.15);
    color: #fff;
    /* backdrop-filter: blur(10px); */
}
#start-button { padding: 0 12px; cursor: pointer; transition: background-color 0.1s ease; display: flex; align-items: center; justify-content: center; height: 100%; border: none; background: transparent;}
#start-button:hover { background-color: rgba(255, 255, 255, 0.1); }
#start-button img { width: 20px; height: 20px; }
#taskbar-icons { display: flex; align-items: stretch; height: 100%; margin-left: 5px;}
.taskbar-icon {
    background: transparent; border: none; padding: 0 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; height: 100%;
    min-width: 45px; transition: background-color 0.1s ease;
    border-bottom: 3px solid transparent; box-sizing: border-box; position: relative;
}
.taskbar-icon:hover { background-color: rgba(255, 255, 255, 0.1); }
.taskbar-icon.active { background-color: rgba(255, 255, 255, 0.2); border-bottom-color: #91c9f7; }
/* Kích thước icon/ảnh CON taskbar */
.taskbar-icon i, .taskbar-icon img {
    font-size: 18px;
    width: var(--taskbar-icon-width, 24px);
    height: var(--taskbar-icon-height, 24px);
    display: block; object-fit: contain;
}
.taskbar-icon i { color: #f0f0f0; }
#notification-area { display: flex; align-items: stretch; height: 100%; }
#clock { display:flex; align-items:center; padding: 0 10px; font-size: 0.85em; height:100%; white-space: nowrap; cursor: default;}
#event-ticker { display: none; align-items: center; padding: 0 10px; font-size: 0.85em; height: 100%; cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; border-left: 1px solid rgba(255, 255, 255, 0.2); margin-left: 5px; }
#event-ticker i { margin-right: 5px; opacity: 0.8; font-size: 0.95em; }
.notification-icons, .notification-chevron { display: flex; align-items: center; padding: 0 8px; cursor: pointer; transition: background-color 0.1s ease; height: 100%; }
.notification-icons:hover, .notification-chevron:hover { background-color: rgba(255, 255, 255, 0.1); }
#notification-area i { font-size: 15px; margin-left: 8px; color: #f0f0f0; opacity: 0.9; }

/* --- Start Menu --- */
#start-menu {
    position: fixed; bottom: 40px; left: 0; background-color: rgba(40, 40, 40, 0.92);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    box-shadow: 3px -3px 15px rgba(0, 0, 0, 0.25); z-index: 101; width: 600px;
    height: 65vh; max-height: 700px; display: flex; color: #fff; border-radius: 5px 5px 0 0;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0s linear 0.2s, transform 0.2s ease;
}
#start-menu.show { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
/* Cột trái */
.start-menu-left { background-color: rgba(30, 30, 30, 0.8); width: 240px; padding: 10px 0; display: flex; flex-direction: column; border-radius: 5px 0 0 0; }
.user-info { display: flex; align-items: center; padding: 15px 20px; margin-bottom: 10px;}
.user-info img { width: 40px; height: 40px; border-radius: 50%; margin-right: 12px; border: 1px solid #666;}
.user-info span { font-weight: 500; }
ul.left-menu-icons { list-style: none; padding: 0; margin: 0; flex-grow: 1; overflow-y: auto; }
ul.left-menu-icons li { padding: 9px 25px; cursor: pointer; display: flex; align-items: center; transition: background-color 0.1s ease; }
ul.left-menu-icons li:hover { background-color: rgba(255, 255, 255, 0.1); }
ul.left-menu-icons li i { font-size: 17px; margin-right: 15px; color: #eee; width: 1.2em; text-align: center;}
ul.left-menu-icons li span { font-size: 0.9em; }
ul.power-options { list-style: none; padding: 10px 0 5px 0; margin: 0; border-top: 1px solid #555; margin-top: 10px; }
ul.power-options li { padding: 10px 25px; cursor: pointer; display: flex; align-items: center; transition: background-color 0.1s ease; }
ul.power-options li:hover { background-color: rgba(255, 255, 255, 0.1); }
ul.power-options li i { font-size: 17px; margin-right: 15px; color: #eee; width: 1.2em; text-align: center;}
ul.power-options li span { font-size: 0.9em; }
/* Cột phải */
.start-menu-right { flex-grow: 1; padding: 15px; overflow-y: auto; }
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--start-menu-tile-min-width, 80px), 1fr)); gap: 8px; }
.app-tile {
    min-height: var(--start-menu-tile-min-height, 80px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 8px; border-radius: 3px; cursor: pointer; text-align: center;
    background-color: var(--accent-color, #0078d4); /* Dùng màu nhấn */
    transition: background-color 0.1s ease, transform 0.1s ease;
    overflow: hidden; position: relative; color: #fff;
}
.app-tile:hover { background-color: #106ebe; transform: scale(1.03); z-index: 1; }
.app-tile:active { background-color: #005a9e; transform: scale(1); }
/* Kích thước icon/ảnh trong tile */
.app-tile i, .app-tile img {
    font-size: 26px;
    max-width: calc(var(--start-menu-tile-min-width, 80px) * 0.6);
    max-height: calc(var(--start-menu-tile-min-height, 80px) * 0.45);
    margin-bottom: 5px; object-fit: contain; display: block;
}
.app-tile i { color: #fff; }
.app-tile span { font-size: 0.85em; margin-top: 3px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 2.4em; }

/* --- Window Styles --- */
#window-container { position: absolute; top: 0; left: 0; width: 100%; height: calc(100% - 40px); z-index: 50; pointer-events: none; overflow: hidden; }
.window {
    position: absolute; background-color: #fdfdfd; border: 1px solid #a0a0a0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); z-index: 51; pointer-events: auto;
    overflow: hidden; transition: transform 0.15s ease, opacity 0.15s ease;
    min-width: 250px; min-height: 150px; display: flex; flex-direction: column;
    border-radius: 5px;
}
.window.active { border-color: var(--accent-color, #0078d4); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); z-index: var(--active-window-z, 52); /* JS có thể cập nhật biến này */ }
.window.maximized { border-radius: 0; border: none; box-shadow: none; left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; transition: none !important;} /* Bỏ transition khi maximize */
.window-header {
    background-color: var(--window-header-bg, #eeeeee); /* Dùng biến */
    padding: 0 4px 0 10px; /* Tăng padding trái */ border-bottom: 1px solid #ccc;
    display: flex; justify-content: space-between; align-items: center;
    cursor: grab; height: 32px; flex-shrink: 0; user-select: none;
}
.window.active .window-header { background-color: color-mix(in srgb, var(--window-header-bg, #eeeeee) 85%, #a0a0a0); } /* Làm tối nhẹ header khi active */
.window.maximized .window-header { cursor: default; border-radius: 0; }
.window:active .window-header, .window.dragging .window-header { cursor: grabbing; }
.window-title { font-weight: 400; font-size: 0.9em; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px;}
.window-controls { display: flex; }
.window-controls button { background: transparent; border: none; padding: 0; width: 40px; height: 32px; line-height: 32px; cursor: pointer; outline: none; color: #333; font-size: 16px; font-family: 'Segoe MDL2 Assets', 'Segoe UI Symbol'; /* Font chứa ký tự chuẩn */ transition: background-color 0.1s ease, color 0.1s ease; text-align: center; }
.window-controls button:hover { background-color: rgba(0, 0, 0, 0.1); }
.window-controls button.close-btn:hover { background-color: #e81123; color: white;}
.window-controls button:active { background-color: rgba(0, 0, 0, 0.2); }
.window-controls button.close-btn:active { background-color: #c30f1e; }
.window-content { padding: 10px; color: #333; background-color: #fff; flex-grow: 1; overflow: auto; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;}
.window.iframe-window .window-content { padding: 0; overflow: hidden; }
.window-content iframe { width: 100%; height: 100%; border: none; }

/* --- Context Menu --- */
#context-menu {position: fixed;background-color: #f9f9f9;border: 1px solid #b0b0b0;box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.15);z-index: 130;padding: 4px 0;min-width: 180px;border-radius: 3px;display: none;font-size: 0.9em;}
#context-menu ul { list-style: none; padding: 0; margin: 0; }
#context-menu li { padding: 7px 25px; cursor: pointer; color: #222; transition: background-color 0.1s ease, color 0.1s ease; white-space: nowrap; }
#context-menu li:hover { background-color: #0078d4; color: white; }
#context-menu li.separator { height: 1px; background-color: #d0d0d0; margin: 4px 1px; padding: 0; cursor: default; }
#context-menu li.separator:hover { background-color: #d0d0d0; }

/* --- Event Sidebar --- */
#events-sidebar {position: fixed;top: 9px;right: 3px;bottom: 40px;width: 302px;height: 845px;opacity: 0.9;background-color: rgba(30, 30, 30, 0.92);backdrop-filter: blur(12px);-webkit-backdrop-filter: blur(12px);color: #e0e0e0;padding: 10px 0px 10px 15px;box-shadow: -3px 0 10px rgba(0, 0, 0, 0.25);z-index: 95;display: flex;flex-direction: column;overflow: hidden;border-left: 1px solid rgba(255, 255, 255, 0.1);}
#events-sidebar h2 { font-size: 1.1em; color: #fff; margin: 5px 15px 15px 0; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); font-weight: 500; text-align: center; }
#events-sidebar h2 i { margin-right: 8px; opacity: 0.8; }
#event-list-panel { flex-grow: 1; overflow-y: auto; padding-right: 10px; }
#event-list-panel::-webkit-scrollbar { width: 5px; } #event-list-panel::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; } #event-list-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; } #event-list-panel::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }
.event-item {background-color: rgba(255, 255, 255, 0.07);padding: 10px 12px;margin-bottom: 8px;border-radius: 4px;border: 1px solid rgba(255, 255, 255, 0.1);transition: background-color 0.2s ease;}
.event-item:hover { background-color: rgba(255, 255, 255, 0.12); }
.event-item .event-title { font-weight: 500; font-size: 0.93em; color: #fff; display: block; margin-bottom: 3px; }
.event-item .event-countdown { font-size: 0.88em; color: #a0cfff; display: block; }
.event-item .event-countdown .time-unit { font-size: 0.8em; opacity: 0.8; margin-left: 1px; }
.event-item .event-passed { font-size: 0.88em; color: #ffacac; font-style: italic; }
#event-list-panel .loading-events, #event-list-panel .no-events { text-align: center; font-style: italic; color: #aaa; padding: 20px 0; font-size: 0.9em; }
/* CSS cho danh sách sự kiện tùy chỉnh */
.event-list-ul {
  margin-bottom: 0; /* Reset margin nếu cần */
  padding-left: 0; /* list-unstyled đã làm việc này, nhưng ghi rõ cũng tốt */
}

.event-list-ul .event-item {
  padding: 10px 10px 10px 15px; /* Padding tùy chỉnh, có padding trái cho border */
  border-bottom: 1px solid #e9ecef; /* Đường kẻ ngăn cách */
  position: relative; /* Để định vị border-left */
  /* transition: background-color 0.2s ease; Bỏ hover nếu không cần */
}

.event-list-ul .event-item:last-child {
  border-bottom: none; /* Bỏ đường kẻ cho item cuối */
}

/* Style cho các item đặc biệt (có class được PHP thêm vào) */
.event-list-ul .event-item-today {
  background-color: rgb(255 0 0 / 34%); /* Màu nền vàng nhạt */
  border-left: 3px solid #ffc107; /* Border trái màu vàng */
  padding-left: 12px; /* Giảm padding trái đi một chút */
  opacity: 1;
}

.event-list-ul .event-item-upcoming {
  background-color: rgb(79 169 161 / 19%); /* Màu nền xanh nhạt */
  border-left: 3px solid #17a2b8; /* Border trái màu xanh */
  padding-left: 5px;
}

.event-list-ul .event-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline; /* Căn theo baseline của text */
  margin-bottom: 3px;
}

.event-list-ul .event-item-title {
  font-weight: 500;
  font-size: 0.95rem; /* Kích thước chữ tiêu đề */
  margin-right: 8px; /* Khoảng cách với status */
  line-height: 1.3;
}
.event-list-ul .event-item-title .fa-fw {
   width: 1.25em; /* Căn chỉnh icon fontawesome */
   opacity: 0.8;
}
.event-list-ul .event-item-title .event-age-badge {
  font-size: 0.7em;
  vertical-align: middle; /* Căn giữa với text */
  margin-left: 5px;
  padding: .2em .5em;
  font-weight: normal; /* Giảm đậm nếu cần */
}

.event-list-ul .event-item-status {
  font-size: 0.8rem;
  white-space: nowrap; /* Không xuống dòng */
  font-style: italic;
}

/* Màu chữ trạng thái (đã có class text-danger, text-primary...) */
/* .event-list-ul .text-danger { color: #dc3545 !important; } */
/* .event-list-ul .text-primary { color: #007bff !important; } */


.event-list-ul .event-item-date {
  font-size: 0.8rem;
  margin-bottom: 4px;
  color: #9eebeb; /* Màu xám */
}

.event-list-ul .event-item-desc {
  font-size: 0.8rem;
  margin-top: 3px;
  line-height: 1.4;
  color: #86ff85; /* Màu chữ mô tả */
  padding-right: 5px; /* Tránh chữ chạm sát lề */
}

.text-pink { /* Màu cho icon sinh nhật */
    color: #e83e8c;
}

/* --- Category Popup Modal --- */
/* Dùng chung style .modal-overlay, .modal-content từ admin_style.css nếu có, hoặc định nghĩa ở đây */
/* Ví dụ tái sử dụng style modal */
#category-popup { /* Thêm ID để target */ /* Các style của .modal-overlay */display: none;position: fixed;z-index: 110;left: 0;top: 0;width: 100%;height: 100%;overflow: auto;background-color: rgba(0, 0, 0, 0.7);justify-content: center;align-items: center;padding: 20px;}
#category-popup .category-popup-content { background-color: #f8f9fa; margin: auto; padding: 0; border: 1px solid #bbb; width: 90%; max-width: 777px; max-height: 85vh; border-radius: 6px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.25); animation-name: animatetop; animation-duration: 0.3s; display: flex; flex-direction: column; }
@keyframes animatetop { from {transform: translateY(-50px); opacity: 0} to {transform: translateY(0); opacity: 1} }
#category-popup h2 { margin: 0; padding: 15px 20px; font-size: 1.3em; color: #333; border-bottom: 1px solid #ccc; background-color: #e9ecef; border-radius: 6px 6px 0 0; flex-shrink: 0; }
#category-popup .category-popup-close { color: #888; position: absolute; top: 8px; right: 15px; font-size: 28px; font-weight: bold; line-height: 1; cursor: pointer; }
#category-popup .category-popup-close:hover { color: #000; }
#category-popup-icons { padding: 15px; display: flex; flex-wrap: wrap; gap: 15px; overflow-y: auto; flex-grow: 1; justify-content: flex-start; align-content: flex-start; }
/* Style cho icon bên trong popup category - dùng lại style .desktop-icon nhưng chỉnh sửa */
#category-popup-icons .category-item-icon {
     width: var(--desktop-icon-container-width, 96px); /* Nhỏ hơn desktop một chút */
     height: var(--desktop-icon-container-height, 96px);
     color: #333; /* Chữ đen */
     text-shadow: none;
     padding: 5px; margin: 0; border-radius: 4px; text-align: center; cursor: pointer;
     display: flex; flex-direction: column; justify-content: flex-start; align-items: center;
     transition: background-color 0.1s ease, transform 0.1s ease;
     background-color: rgba(255, 255, 255, 0.6); /* Nền sáng hơn */
     border: 1px solid #ddd; overflow: hidden;
}
#category-popup-icons .category-item-icon:hover { background-color: rgba(0, 120, 215, 0.1); border-color: rgba(0, 120, 215, 0.4); }
#category-popup-icons .category-item-icon:active { background-color: rgba(0, 120, 215, 0.2); transform: scale(0.97); }
#category-popup-icons .category-item-icon i,
#category-popup-icons .category-item-icon img {
    font-size: calc(var(--desktop-icon-container-height, 85px) * 0.4);
    width: calc(var(--desktop-icon-container-width, 85px) - 20px);
    max-height: calc(var(--desktop-icon-container-height, 85px) - 35px);
    margin-bottom: 4px; display: block; object-fit: contain;
}
#category-popup-icons .category-item-icon i { color: inherit; } /* Kế thừa màu chữ */
#category-popup-icons .category-item-icon p { font-size: 0.8em; margin:0px; padding-top: 2px; width: 100%; word-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; text-align: center; }


/* --- Utility Classes --- */
.hidden-field { display: none !important; }
.clicked { transform: scale(0.97); opacity: 0.8; transition: transform 0.05s ease, opacity 0.05s ease; }
.dragging { opacity: 0.6; cursor: grabbing !important; border: 1px dashed #fff !important; background-color: rgba(0,0,0,0.1) !important; }
.default-icon { color: #aaa !important; }

/* Picture Viewer Specific Styles (Nếu dùng cửa sổ riêng) */
.picture-viewer-content { flex-grow: 1; display: flex; justify-content: center; align-items: center; overflow: hidden; padding: 10px; background-color: #333; position: relative; }
#picture-viewer-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity 0.25s ease-in-out; opacity: 1;}
#picture-viewer-image.fade-out { opacity: 0; }
.picture-viewer-controls { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); padding: 15px 20px; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; opacity: 0.8; transition: opacity 0.3s ease-in-out; }
.picture-viewer-content:hover .picture-viewer-controls { opacity: 1; }
.picture-nav-button { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #fff; padding: 8px 15px; border-radius: 50%; cursor: pointer; font-size: 1.1em; transition: background-color 0.2s ease; line-height: 1; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.picture-nav-button:hover:not(:disabled) { background: rgba(255,255,255,0.3); }
.picture-nav-button:disabled { opacity: 0.3; cursor: not-allowed; }
.picture-counter { font-size: 0.95em; color: #fff; }
/* Widget CSS */ .widget { position: absolute; background-color: #f0f0f0; border: 1px solid #ccc; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; resize: both; min-width: 150px; min-height: 100px; } .widget-header { background-color: var(--window-header-bg, #eee); padding: 4px 8px; cursor: grab; border-bottom: 1px solid #ccc; font-size: 0.8em; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; flex-shrink: 0; height: 25px; display: flex; align-items: center; } .widget-header .widget-title { flex-grow: 1; } .widget.dragging .widget-header { cursor: grabbing; } .widget.dragging { opacity: 0.8; } .widget-content { flex-grow: 1; background-color: #fff; overflow: hidden; } .widget-content iframe { display: block; border: none; } .widget-content p { margin: 0; }