/*
    Colorbox Core Style:
    The following CSS is consistent between example themes and should not be altered.
*/
#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:999999999999; overflow:hidden;}
#cboxOverlay{position:fixed; width:100%; height:100%;}
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
#cboxContent{position:relative;}
#cboxLoadedContent{overflow:auto; -webkit-overflow-scrolling: touch;}
#cboxTitle{margin:0;}
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none; -ms-interpolation-mode:bicubic;}
.cboxIframe{width:100%; height:100%; display:block; border:0;}
#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box; -moz-box-sizing:content-box; -webkit-box-sizing:content-box;}

/* 
    User Style:
    Change the following styles to modify the appearance of Colorbox.  They are
    ordered & tabbed in a way that represents the nesting of the generated HTML.
*/
#cboxOverlay{background:url(images/overlay.png) repeat 0 0;}
#colorbox{outline:0;}
    #cboxTopLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px 0;}
    #cboxTopRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px 0;}
    #cboxBottomLeft{width:21px; height:21px; background:url(images/controls.png) no-repeat -101px -29px;}
    #cboxBottomRight{width:21px; height:21px; background:url(images/controls.png) no-repeat -130px -29px;}
    #cboxMiddleLeft{width:21px; background:url(images/controls.png) left top repeat-y;}
    #cboxMiddleRight{width:21px; background:url(images/controls.png) right top repeat-y;}
    #cboxTopCenter{height:21px; background:url(images/border.png) 0 0 repeat-x;}
    #cboxBottomCenter{height:21px; background:url(images/border.png) 0 -29px repeat-x;}
    #cboxContent{background:#fff; overflow:hidden;}
        .cboxIframe{background:#fff;}
        #cboxError{padding:50px; border:1px solid #ccc;}
        #cboxLoadedContent{margin-bottom:28px;}
        #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
        #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
        #cboxLoadingOverlay{background:url(images/loading_background.png) no-repeat center center;}
        #cboxLoadingGraphic{background:url(images/loading.gif) no-repeat center center;}

        /* these elements are buttons, and may need to have additional styles reset to avoid unwanted base styles */
        #cboxPrevious, #cboxNext, #cboxSlideshow, #cboxClose {border:0; padding:0; margin:0; overflow:visible; width:auto; background:none; }
        
        /* avoid outlines on :active (mouseclick), but preserve outlines on :focus (tabbed navigating) */
        #cboxPrevious:active, #cboxNext:active, #cboxSlideshow:active, #cboxClose:active {outline:0;}

        #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
        #cboxPrevious{position:absolute; bottom:0; left:0; background:url(images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
        #cboxPrevious:hover{background-position:-75px -25px;}
        #cboxNext{position:absolute; bottom:0; left:27px; background:url(images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
        #cboxNext:hover{background-position:-50px -25px;}
        #cboxClose{position:absolute; bottom:0; right:0; background:url(images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
        #cboxClose:hover{background-position:-25px -25px;}

/*
  The following fixes a problem where IE7 and IE8 replace a PNG's alpha transparency with a black fill
  when an alpha filter (opacity change) is set on the element or ancestor element.  This style is not applied to or needed in IE9.
  See: http://jacklmoore.com/notes/ie-transparency-problems/
*/
.cboxIE #cboxTopLeft,
.cboxIE #cboxTopCenter,
.cboxIE #cboxTopRight,
.cboxIE #cboxBottomLeft,
.cboxIE #cboxBottomCenter,
.cboxIE #cboxBottomRight,
.cboxIE #cboxMiddleLeft,
.cboxIE #cboxMiddleRight {
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
}

.wdc-tooltip {
    position: fixed;
    display: none;
    background: #444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    white-space: pre-line;
    max-width: 350px;
    z-index: 2147483647;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    animation: wdcTooltipFadeIn 0.15s ease-out;
}
/* Default placement is above the element: slide up into position. */
.wdc-tooltip.wdc-tooltip-below { animation-name: wdcTooltipFadeInBelow; }
.wdc-tooltip.no-animation { animation: none; }

/* Inline confirm popover (data-wdc-confirm) - anchored by the triggering button,
   replaces native confirm(). Accessible: role=alertdialog, focusable buttons,
   high-contrast, large tap targets for the older member base. */
.wdc-confirm {
    position: fixed;
    display: none;
    z-index: 2147483647;
    max-width: 320px;
    background: #ffffff;
    color: #1d1d1d;
    border: 1px solid #b9b9b9;
    border-radius: 8px;
    box-shadow: 0 6px 26px rgba(0, 0, 0, 0.24);
    padding: 13px 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}
.wdc-confirm-msg { margin-bottom: 12px; text-wrap: balance; }
.wdc-confirm-btns { display: flex; gap: 8px; justify-content: flex-end; }
.wdc-confirm-btns button {
    font-size: 13px;
    padding: 7px 16px;
    min-height: 36px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}
.wdc-confirm-yes { background: #0a66c2; color: #fff; border: 1px solid #0a66c2; }
.wdc-confirm-no  { background: #f1f1f1; color: #1d1d1d; border: 1px solid #c4c4c4; }
.wdc-confirm-yes:disabled { opacity: .6; cursor: default; }
.wdc-confirm-yes:focus, .wdc-confirm-no:focus { outline: 2px solid #0a66c2; outline-offset: 2px; }

/* Unsaved-changes bar (wdcSaveBar / wdcFormSaveBar in myjs.php): the Email Options page, the
   interactive Manage Settings tab, Manage Book, My Groups ordering and the cNote collection dashboard. Floats at the bottom of the viewport, under the
   Messenger float (9999). A page may also draw a docked copy inside its form (class wdc-savebar
   without wdc-savebar-float) so Save sits after the last setting in the tab order. */
.wdc-savebar {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
    background: #fffbea;
    border: 2px solid #e0b800;
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;
}
.wdc-savebar[hidden] { display: none; }
.wdc-savebar-float {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 9000;
    width: max-content;
    max-width: calc(100% - 32px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.wdc-savebar-msg { flex: 1 1 auto; font-weight: 600; color: #5c4400; }
.wdc-savebar-msg:empty { display: none; }
.wdc-savebar-btn {
    box-sizing: border-box;
    min-height: 36px;
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid #b0b0b0;
    background: #ffffff;
    color: #1d1d1d;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
.wdc-savebar-btn:hover { background: #f1f1f1; }
.wdc-savebar-go { background: #0a66c2; border-color: #0a66c2; color: #ffffff; }
.wdc-savebar-go:hover { background: #0857a6; }
.wdc-savebar-btn:focus-visible { outline: 2px solid #0a66c2; outline-offset: 2px; }
.wdc-savebar-btn:disabled { opacity: 0.55; cursor: default; }
@media (pointer: coarse) {
    .wdc-savebar-btn { min-height: 44px; }
}
@media (max-width: 600px) {
    .wdc-savebar-float { left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; width: auto; max-width: none; }
    .wdc-savebar-msg { flex: 1 1 100%; }
    .wdc-savebar .wdc-savebar-btn { flex: 1 1 0; }
}

@keyframes wdcTooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes wdcTooltipFadeInBelow {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Generic sortable table. Headers in <thead> become clickable; cells may
   carry data-sort-value to override their displayed text for sort purposes. */
table.wdc-sortable thead th {
    cursor: pointer;
    user-select: none;
    position: relative;
}
table.wdc-sortable thead th:hover {
    background: var(--wdc-surface);
}
table.wdc-sortable thead th:focus-visible {
    outline: 2px solid var(--wdc-accent);
    outline-offset: -2px;
}
table.wdc-sortable .wdc-sort-ind {
    display: inline-block;
    min-width: 1em;
    font-size: 0.85em;
    color: var(--wdc-accent);
}

/* Accessibility: show comment/post action buttons on keyboard focus (not just mouse hover) */
article[id^="post_"]:focus-within [id^="favUnit_"] { display:block !important; }
div[id^="post_"]:focus-within [id^="favUnit_"] { display:block !important; }
.dimUnit:focus-within .favUnit { display:block !important; }
.dimUnit:focus-within .hideUnit { visibility:visible !important; display:block !important; }

/* Accessibility: visible focus ring for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2895f7;
    outline-offset: 2px;
}
.w-input:focus-visible,
.w-select:focus-visible {
    outline: 2px solid #2895f7;
    outline-offset: -2px;
}
.w-dropdown-toggle:focus-visible {
    outline: 2px solid #2895f7;
    outline-offset: 2px;
}
#rtStars:focus-visible,
#desktopStars:focus-visible,
#mobileStars:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #2895f7;
    border-radius: 6px;
}

[role="button"]:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 2px solid #2895f7;
    outline-offset: 2px;
}

/* Accessibility: screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Accessibility: show comment action icons on keyboard focus (not just mouseover) */
[id^="post_"]:focus-within [id^="favUnit_"] {
    display: block !important;
}

/* Bot instrumentation: visually-hidden honeypot link. Off-screen but in DOM so */
/* crawlers can follow; aria-hidden + tabindex=-1 on the anchor hide it from ATs. */
/* Do NOT use display:none or visibility:hidden -- modern crawlers skip both. */
.sc-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
