/* =========================================================
   EDITIONS LIST
========================================================= */

.ars-editions-list {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.ars-editions-list h2 {
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
}

.ars-edition-item {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: 0.3s;
}

.ars-edition-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.ars-edition-item a {
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

/* =========================================================
   VIEWER CONTAINER
========================================================= */

.ars-viewer-container {
    background: #f1f1f1;
    padding: 20px 15px;
}

/* =========================================================
   TOOLBAR
========================================================= */

.ars-toolbar {
    position: sticky;
    top: 0;
    z-index: 99999;
    background: #111;
    padding: 12px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ars-toolbar button {
    background: #fff;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 15px;
    border-radius: 4px;
    transition: 0.2s;
    font-weight: 600;
}

.ars-toolbar button:hover {
    background: #e5e5e5;
}

/* =========================================================
   PAGE TITLE
========================================================= */

.ars-page-title {
    text-align: center;
    margin-bottom: 30px;
}

.ars-page-title h2 {
    font-size: 32px;
    font-weight: 700;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.ars-main-layout {
    display: flex;
    gap: 20px;
}

/* =========================================================
   SIDEBAR
========================================================= */

.ars-sidebar {
    width: 160px;
    position: sticky;
    top: 70px;
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    padding: 10px;
    border-right: 1px solid #ddd;
}

.ars-thumb-link {
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
    color: #222;
    font-size: 13px;
    text-align: center;
}

.ars-thumb-image {
    width: 100%;
    border: 1px solid #ccc;
    margin-bottom: 5px;
    border-radius: 4px;
}

/* =========================================================
   CONTENT
========================================================= */

.ars-content {
    flex: 1;
}

/* =========================================================
   PAGE
========================================================= */

.ars-page {
    max-width: 1200px;
    margin: 0 auto 30px auto;
    text-align: center;
}

.ars-image-wrapper {
    position: relative;
    display: inline-block;
}

.ars-page img,
.ars-page-image {
    width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: block;
}

/* =========================================================
   FULLSCREEN
========================================================= */

.ars-viewer-container:fullscreen {
    background: #000;
    padding: 20px;
    overflow: auto;
}

.ars-viewer-container:fullscreen .ars-page img {
    max-width: 1400px;
}

/* =========================================================
   FLOATING SHARE TOOLBAR
========================================================= */

#ars-floating-toolbar {
    position: absolute;
    z-index: 999999999;
    display: none;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

#ars-floating-toolbar button {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 3px 16px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    padding: 0;
}

#ars-floating-toolbar button:hover {
    transform: scale(1.08);
}

#ars-floating-toolbar img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

#ars-download-crop,
#ars-close-crop {
    font-size: 22px;
    font-weight: bold;
    color: #111;
}

/* =========================================================
   JCROP
========================================================= */

.jcrop-holder {
    margin: 0 auto;
    overflow: visible !important;
}

.jcrop-vline,
.jcrop-hline {
    background: #fff !important;
}

.jcrop-handle {
    background-color: #fff !important;
    border: 1px solid #111 !important;
}

/* =========================================================
   SCROLL
========================================================= */

html {
    scroll-behavior: smooth;
}

/* =========================================================
   MOBILE
========================================================= */

@media(max-width: 768px) {

    .ars-main-layout {
        display: block;
    }

    .ars-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        white-space: nowrap;
        margin-bottom: 20px;
    }

    .ars-thumb-link {
        min-width: 100px;
    }

    .ars-toolbar {
        gap: 5px;
    }

    .ars-toolbar button {
        font-size: 13px;
        padding: 8px 12px;
    }

    #ars-floating-toolbar button {
        width: 46px;
        height: 46px;
    }

    #ars-floating-toolbar img {
        width: 22px;
        height: 22px;
    }
}
/* Archive Dropdown Style */
.ars-archive-dropdown {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.ars-archive-dropdown label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ars-archive-dropdown select {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    min-width: 250px;
}

.ars-archive-dropdown select:hover {
    border-color: #0073aa;
}

/* Floating Toolbar Responsive */
@media(max-width: 768px) {
    #ars-floating-toolbar {
        padding: 8px 16px !important;
        gap: 8px !important;
    }
    
    #ars-floating-toolbar button {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}.
/* =========================================================
   HEADER BAR - NO BACKGROUND
========================================================= */

.ars-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 9999;
    flex-wrap: wrap;
    gap: 15px;
}

.ars-header-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #570606 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ars-header-right {
    text-align: right;
}

/* Professional Date Select Dropdown */
.ars-edition-select {
    padding: 12px 20px;
    min-width: 200px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.ars-edition-select:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.ars-edition-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.ars-edition-select option {
    padding: 12px;
    background: white;
    color: #333;
}

/* Dropdown calendar icon */
.ars-edition-select option:before {
    content: "📅";
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .ars-header-bar {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
    }
    
    .ars-header-title {
        font-size: 18px;
    }
    
    .ars-header-right {
        width: 100%;
    }
    
    .ars-edition-select {
        width: 100%;
        min-width: auto;
    }
}

/* =========================================================
   TOOLBAR STYLING
========================================================= */

.ars-toolbar {
    background: #f8f9fa;
    padding: 12px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.ars-toolbar button {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.2s ease;
    color: #555;
}

.ars-toolbar button:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* =========================================================
   SIDEBAR STYLING
========================================================= */

.ars-sidebar {
    width: 160px;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    background: #fafafa;
    padding: 15px 10px;
    border-right: 1px solid #e0e0e0;
}

.ars-thumb-link {
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.ars-thumb-link:hover {
    transform: translateY(-2px);
}

.ars-thumb-image {
    width: 100%;
    border: 1px solid #e0e0e0;
    margin-bottom: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ars-thumb-link:hover .ars-thumb-image {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* =========================================================
   CONTENT & PAGES
========================================================= */

.ars-content {
    flex: 1;
    padding: 20px;
}

.ars-page {
    max-width: 1000px;
    margin: 0 auto 30px auto;
    text-align: center;
}

.ars-image-wrapper {
    position: relative;
    display: inline-block;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ars-page-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .ars-main-layout {
        display: block;
    }
    
    .ars-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        display: flex;
        overflow-x: auto;
        gap: 10px;
        white-space: nowrap;
        margin-bottom: 20px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px;
    }
    
    .ars-thumb-link {
        min-width: 80px;
        display: inline-block;
    }
    
    .ars-content {
        padding: 15px;
    }
}
/* =========================================================
   MOBILE CROP IMPROVEMENTS
   ========================================================= */

/* Larger touch handles for mobile */
@media (max-width: 768px) {
    .jcrop-handle {
        width: 32px !important;
        height: 32px !important;
        background: rgba(102, 126, 234, 0.9) !important;
        border: 2px solid white !important;
        border-radius: 50% !important;
    }
    
    .jcrop-selection {
        border: 2px solid #667eea !important;
        box-shadow: 0 0 0 2px rgba(255,255,255,0.3) !important;
    }
    
    .jcrop-active {
        touch-action: none;
    }
    
    /* Mobile toolbar adjustments */
    #ars-floating-toolbar {
        max-width: calc(100% - 20px);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
/* =========================================================
   JCROP HANDLES - PROPER SIZE (Not too big)
   ========================================================= */

/* Default handle size for desktop */
.jcrop-handle {
    width: 14px !important;
    height: 14px !important;
    background-color: #ffffff !important;
    border: 2px solid #667eea !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* Corner handles position fix */
.jcrop-handle.ord-n {
    top: -7px !important;
    left: 50% !important;
    margin-left: -7px !important;
}

.jcrop-handle.ord-s {
    bottom: -7px !important;
    left: 50% !important;
    margin-left: -7px !important;
}

.jcrop-handle.ord-e {
    right: -7px !important;
    top: 50% !important;
    margin-top: -7px !important;
}

.jcrop-handle.ord-w {
    left: -7px !important;
    top: 50% !important;
    margin-top: -7px !important;
}

.jcrop-handle.ord-ne {
    top: -7px !important;
    right: -7px !important;
}

.jcrop-handle.ord-nw {
    top: -7px !important;
    left: -7px !important;
}

.jcrop-handle.ord-se {
    bottom: -7px !important;
    right: -7px !important;
}

.jcrop-handle.ord-sw {
    bottom: -7px !important;
    left: -7px !important;
}

/* Mobile - slightly larger but not too big */
@media (max-width: 768px) {
    .jcrop-handle {
        width: 18px !important;
        height: 18px !important;
        background-color: #667eea !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    }
    
    .jcrop-handle.ord-n {
        top: -9px !important;
        margin-left: -9px !important;
    }
    
    .jcrop-handle.ord-s {
        bottom: -9px !important;
        margin-left: -9px !important;
    }
    
    .jcrop-handle.ord-e {
        right: -9px !important;
        margin-top: -9px !important;
    }
    
    .jcrop-handle.ord-w {
        left: -9px !important;
        margin-top: -9px !important;
    }
    
    .jcrop-handle.ord-ne,
    .jcrop-handle.ord-nw,
    .jcrop-handle.ord-se,
    .jcrop-handle.ord-sw {
        width: 18px !important;
        height: 18px !important;
    }
    
    .jcrop-handle.ord-ne {
        top: -9px !important;
        right: -9px !important;
    }
    
    .jcrop-handle.ord-nw {
        top: -9px !important;
        left: -9px !important;
    }
    
    .jcrop-handle.ord-se {
        bottom: -9px !important;
        right: -9px !important;
    }
    
    .jcrop-handle.ord-sw {
        bottom: -9px !important;
        left: -9px !important;
    }
}

/* Selection box styling */
.jcrop-selection {
    border: 2px solid #667eea !important;
    background: rgba(102, 126, 234, 0.1) !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.5) !important;
}

/* Trackers */
.jcrop-tracker {
    -webkit-tap-highlight-color: transparent;
}
/* =========================================================
   JCROP HANDLES - SMALL & NEAT
   ========================================================= */

/* Desktop handle size */
.jcrop-handle {
    width: 10px !important;
    height: 10px !important;
    background-color: #ffffff !important;
    border: 2px solid #667eea !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}

/* Handle positions */
.jcrop-handle.ord-n {
    top: -5px !important;
    left: 50% !important;
    margin-left: -5px !important;
}

.jcrop-handle.ord-s {
    bottom: -5px !important;
    left: 50% !important;
    margin-left: -5px !important;
}

.jcrop-handle.ord-e {
    right: -5px !important;
    top: 50% !important;
    margin-top: -5px !important;
}

.jcrop-handle.ord-w {
    left: -5px !important;
    top: 50% !important;
    margin-top: -5px !important;
}

.jcrop-handle.ord-ne {
    top: -5px !important;
    right: -5px !important;
}

.jcrop-handle.ord-nw {
    top: -5px !important;
    left: -5px !important;
}

.jcrop-handle.ord-se {
    bottom: -5px !important;
    right: -5px !important;
}

.jcrop-handle.ord-sw {
    bottom: -5px !important;
    left: -5px !important;
}

/* Mobile - slightly larger but still small */
@media (max-width: 768px) {
    .jcrop-handle {
        width: 14px !important;
        height: 14px !important;
        background-color: #667eea !important;
        border: 2px solid #ffffff !important;
    }
    
    .jcrop-handle.ord-n {
        top: -7px !important;
        margin-left: -7px !important;
    }
    
    .jcrop-handle.ord-s {
        bottom: -7px !important;
        margin-left: -7px !important;
    }
    
    .jcrop-handle.ord-e {
        right: -7px !important;
        margin-top: -7px !important;
    }
    
    .jcrop-handle.ord-w {
        left: -7px !important;
        margin-top: -7px !important;
    }
    
    .jcrop-handle.ord-ne {
        top: -7px !important;
        right: -7px !important;
    }
    
    .jcrop-handle.ord-nw {
        top: -7px !important;
        left: -7px !important;
    }
    
    .jcrop-handle.ord-se {
        bottom: -7px !important;
        right: -7px !important;
    }
    
    .jcrop-handle.ord-sw {
        bottom: -7px !important;
        left: -7px !important;
    }
}

/* Selection box */
.jcrop-selection {
    border: 2px solid #667eea !important;
    background: rgba(102, 126, 234, 0.1) !important;
}