/**
 * ARWAI Image Annotator - v2 (Simple Viewer)
 *
 * Frontend public styles for the new simple image viewer.
 */

/* ==========================================================================
   1. Viewer: Main Container & Layout
   ========================================================================== */
.arwai-simple-viewer {
    /* ... (your existing styles) ... */
}
.arwai-simple-viewer-main {
    position: relative; /* Crucial for layering the nav on top */
    background-color: #f0f2f5;
}
/* ==========================================================================
   2. SLICK SLIDER & NAVIGATION STYLES
   ========================================================================== */
.arwai-slick-slider .slick-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}
.arwai-slick-slide-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 66vh;
    width: 100%;
}
.arwai-slick-slide-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.arwai-simple-viewer-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Ensure it's on top of the slider */
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
}
.arwai-simple-viewer-nav button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.arwai-simple-viewer-nav button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.arwai-simple-counter {
    color: white;
    font-weight: 500;
}


/* ==========================================================================
   3. Viewer: Thumbnail Reference Strip
   ========================================================================== */

.arwai-simple-viewer-strip-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
}


#arwai-simple-viewer-reference-strip {
display: flex;
    overflow-y: auto;
    padding: 10px 0;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

#arwai-simple-viewer-reference-strip::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.arwai-simple-thumb {
    height: 80px;
    margin: 0 5px;
    border: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0; /* Prevents thumbnails from shrinking */
}

.arwai-simple-thumb:hover {
    border-color: #00a4cb; /* A nice blue hover */
    transform: scale(1.05);
}

.arwai-simple-thumb.active {
    border-color: #e64833; /* A contrasting color for active */
    transform: scale(1.1);
}

.arwai-simple-strip-scroll-left,
.arwai-simple-strip-scroll-right {
    flex-shrink: 0;
    background: #e9ecefbc;
    border: 1px solid #aeb2b5;
    cursor: pointer;
    padding: 10px;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* margin: 0 5px; */

    z-index: 99;
}


.arwai-simple-strip-scroll-left:hover,
.arwai-simple-strip-scroll-right:hover {
    background: #dee2e6;
}


/* ==========================================================================
   4. Annotorious & Annotation List Styles
   ========================================================================== */

:root {
    --annotation-label-base-background-color: #fff; 
    --annotation-label-base-font-color: #000;

    --annotation-label-tagged-background-color: #00a4cb; 
    --annotation-label-tagged-font-color: white;

    --annotation-label-important-background-color: #ff0000; 
    --annotation-label-important-font-color: white;

    --annotation-label-selected-background-color: #fff000; 
    --annotation-label-selected-font-color: #000;
}

/* This makes the custom label visible on the SVG canvas */

  .a9s-annotation foreignObject {
    overflow:visible;
    width:1px;
    height:1px;
  }

  /* Annotation label- base */

  .a9s-annotation foreignObject label {
    display:flex;
    justify-content: center;
    align-items: center;
    width: 1.2rem;
    height: 1.2rem;
    padding: 4px 4px;
    border-radius: 50%;
    transform:translateY(-100%) translateY(50%) translateX(-50%);
    font-size: 12px;
    /* font-weight: bold; */
    white-space: nowrap;

    background-color: var(--annotation-label-base-background-color);
    color:  var(--annotation-label-base-font-color);
    stroke: var(--annotation-label-base-background-color) ;
    fill: rgba(0, 164, 203, 0.1);
  }

  /* .arwai-label-wrapper foreignObject {
    overflow:visible;
    width:20px;
    height:20px;
  } */


/* Annotation label- 'tagged' */
.a9s-annotation.tagged .a9s-inner,
.a9s-annotation.tagged foreignObject label{
    stroke: var(--annotation-label-tagged-background-color);
    fill: rgba(0, 164, 203, 0.1);
    background: var(--annotation-label-tagged-background-color);
    color: var(--annotation-label-tagged-font-color);
}

/* Annotation label- 'important' */
.a9s-annotation.important .a9s-inner,
.a9s-annotation.important foreignObject label{
    stroke: var(--annotation-label-important-background-color);
    fill: rgba(255, 0, 0, 0.1);
    background: var(--annotation-label-important-background-color);
    color: var(--annotation-label-important-font-color);
}

/* Annotation label selected */
.a9s-annotation.selected foreignObject label,
.a9s-annotation.selected .a9s-inner,
.a9s-selection .a9s-inner {
    stroke: var(--annotation-label-selected-background-color) !important;
    background: var(--annotation-label-selected-background-color) !important;
    color: var(--annotation-label-selected-font-color) !important;
}


/**** ANNOTATION LIST ****/
#arwai-annotation-list-container {
    color: black;
    max-width: 350px;
    margin: 2em auto;
    background-color: #fff;
}

#arwai-annotation-list-container h3 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 1em;
}

#arwai-annotation-list {
    list-style: none;
    padding: 1em;
    margin-bottom: 5em;
}

#arwai-annotation-list >li {
    background: #fff;
    border-top: 2px solid #e4e4e4b5;
    padding: 0.3em;
}

.arwai-anno-list-item{
    padding: 5px;

}

/* Annotation ID header */
.arwai-anno-list-header span{ 
    font-weight: bold;
    font-size: 0.75em;
    color: #5a5a5a;
    text-align: center;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e4e4b5;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    float: left;
    transform: translateY(20%);

}

.arwai-anno-list-header{
    height: 100%;
}

.arwai-anno-list-body {
    text-align: center;
}

.arwai-anno-list-comments {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 8px;
    text-align: center;
}

.arwai-anno-list-comment-item p {
    margin: 0 0 1px 0 !important;
    padding: 0;
}


.arwai-anno-list-comment-item {
border-radius: 50px 0 50px 50px!important;
margin-bottom: 10px;

}

.arwai-anno-list-comment-meta {
    font-size: 0.5em;
    color: #6c757d;
}

.arwai-anno-list-footer {
    font-size: 0.7em;
    text-align: center;
    margin: 0 7px;
    padding: 5px;

}

.arwai-anno-list-tag {
    display: inline-block;
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 3px 8px;
    margin: 0 5px 2px 5px;
    font-size: 0.9em;
    border: none;
    border: 0.5px solid #d1d5d8;
    cursor: pointer;
}

.arwai-anno-list-tag a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   5. Annotation Sidebar
   ========================================================================== */


#mainViewerID {
    transition: 0.3s;

}

#sidebarNav {
    transition: margin-right .5s; 
    position: relative;
    text-align:right;
    top: 0;
    right: 0; 
    z-index: 1000;
}

#sidebarNav button {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px 10px 10px;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 0 50px 50px 0;
    display: flex;
    align-items: right;
    justify-content: center;
    width: 54px;
    height: 44px;
    position: relative; 
    pointer-events: auto;
}

.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0; 
    background-color: #fff;
    overflow-x: hidden;
    transition: 0.3s;
    font-size: var(--wp--preset--font-size--medium);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


#sidebarCloseButton,
#sidebarCloseButton2 {
    transform: rotate(180deg);
}
#sidebarCloseButton2 {
    padding-left: 15px;
}

.sidebar a {
    text-decoration: none;
    color: #818181;
    display: block;
    transition: 0.3s;
}
.sidebar a:hover {
    color: #f1f1f1;   
}

/* .sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    margin-left: 50px;
} */

/* .sidebar-nav-button {
    transform: 
        rotate(90deg)
        translateX(-40px) 
        translateY(-52px);
    font-size: .8em;
    cursor: pointer;
    background-color: #111;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 0 0 6px 6px;
}

.openbtn:hover {
  background-color: #444;
} */

/* ==========================================================================
   5. Viewer: Toggle Button (Added)
   ========================================================================== */

#arwai-annotation-show-hide-buttons{
display: flex;
    justify-content: center;
    z-index: 100; /* Ensure it stays on top */
    width: 100%;
}




/* ==========================================================================
   6. OpenSeadragon Modal (Deep Zoom)
   ========================================================================== */

#arwai-osd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    margin: 0;
}

#arwai-osd-viewer {
    width: 100%;
    height: 100%;
}



.arwai-deep-zoom-button {
    background: red;
    border: none;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    margin-left: 10px;
    height: 40px;
    width: 40px;
}

.arwai-deep-zoom-button:hover {
    background-color: rgba(77, 77, 77, 0.491);
}

/* ==========================================================================
   7. OpenSeadragon Custom Toolbar
   ========================================================================== */

.arwai-osd-toolbar-container {
    position: absolute;
    /* top: 40px; */
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000; /* Ensure it's on top */
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding:5px 15px 5px 15px;
    display: flex;
    backdrop-filter: blur(5px);
}


#arwai-openseadragon-toolbar button {
    background: transparent;
    padding: 10px;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 44px;
    height: 44px;
    display: inline-block; 
    position: relative; 
    pointer-events: auto;
}

#arwai-openseadragon-toolbar button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#arwai-openseadragon-toolbar {
    /* top: 20px; */
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    cursor: pointer;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}


/* ==========================================================================
   8. SINGLE ANNOTATION SHORTCODE STYLES
   ========================================================================== */

.arwai-single-annotation-shortcode {
    display: none; /* Hidden by default, shown by JS when an annotation is selected */
    border: 3px solid #dee2e6; /* Default border color */
    border-radius: 8px;
    padding: 1em;
    margin: 2em auto;
    max-width: 700px;
    background: #f8f9fa;
    transition: border-color 0.3s ease; /* Smooth color transition */
}

.arwai-single-annotation-shortcode h3 {
    margin-top: 0;
    text-align: center;
}

#arwai-single-annotation {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- DYNAMIC BORDER COLORS --- */

.arwai-single-annotation-shortcode.is-tagged {
    border-color: #00a4cb; /* Matches the 'tagged' annotation color */
}

.arwai-single-annotation-shortcode.is-important {
    border-color: #ff0000; /* Matches the 'important' annotation color */
}

