/* ==========================================
   AS Hosted Galleries - Download Features
   With styled modal download button
   ========================================== */

/* ==========================================
   SELECTION TOOLBAR
   ========================================== */

#ashg-selection-toolbar {
    background: white;
    margin-top: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.ashg-toolbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ashg-select-all-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

#ashg-select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ashg-select-all-label {
    font-weight: 600;
    font-size: 15px;
    color: #0d3b66;
    cursor: pointer;
    user-select: none;
}

.ashg-selection-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.ashg-download-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================
   DOWNLOAD BUTTONS (TOOLBAR)
   ========================================== */

.ashg-download-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ashg-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ashg-download-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#ashg-download-selected {
    background: #40e0d0;
    color: #000;
}

#ashg-download-selected:not(:disabled):hover {
    background: #36c9ba;
}

#ashg-download-all {
    background: #0d3b66;
    color: white;
}

#ashg-download-all:not(:disabled):hover {
    background: #0a2d4f;
}

.ashg-download-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================
   PHOTO CHECKBOXES
   ========================================== */

.ashg-photo-checkbox-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    pointer-events: none;
    background: white;
    border-radius: 4px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ashg-photo-checkbox {
    pointer-events: auto;
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

/* Hover effect on photo when checkbox present */
.ashg-photo-item:has(.ashg-photo-checkbox:checked) {
    outline: 3px solid #40e0d0;
    outline-offset: -3px;
}

/* ==========================================
   MODAL DOWNLOAD BUTTON (IN FOOTER)
   Styled to match site design
   ========================================== */

.ashg-modal-download-btn {
    margin-top: 16px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0d3b66;
    color: white;
    box-shadow: 0 2px 8px rgba(13, 59, 102, 0.2);
}

.ashg-modal-download-btn:hover {
    background: #0a2d4f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 59, 102, 0.3);
}

.ashg-modal-download-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================
   MODAL CONTAINER STYLING
   Add border radius for desktop
   ========================================== */

.ashg-modal-content {
    border-radius: 12px !important;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .ashg-toolbar-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 16px;
    }
    
    .ashg-select-all-section {
        justify-content: center;
    }
    
    .ashg-download-buttons {
        flex-direction: column;
    }
    
    .ashg-download-btn,
    .ashg-modal-download-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 13px;
    }
    
    .ashg-photo-checkbox-wrapper {
        top: 8px;
        left: 8px;
        padding: 3px;
    }
    
    .ashg-photo-checkbox {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 640px) {
    #ashg-selection-toolbar {
        margin-top: 20px;
        padding: 16px 0;
    }
    
    .ashg-select-all-label {
        font-size: 14px;
    }
    
    .ashg-selection-count {
        font-size: 13px;
    }
}