/* Common Styles for 17 Image and PDF Utility Tools */
.dropzone-container {
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background-color: #f8fafc;
    padding: 45px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.dropzone-container:hover, .dropzone-container.dragover {
    border-color: #2584DC !important;
    background-color: #eff6ff !important;
}
.dropzone-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: inline-block;
}
.compressor-controls {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.comparison-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    background: #ffffff;
    margin-top: 20px;
}

/* Image Cropper specific styles */
.cropper-wrapper {
    max-width: 100%;
    max-height: 450px;
    background-color: #e2e8f0;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.cropper-img {
    max-width: 100%;
    max-height: 400px;
    display: block;
    user-select: none;
}
.crop-overlay {
    position: absolute;
    border: 2px dashed #ffffff;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
}
.crop-overlay.circular {
    border-radius: 50%;
}

/* Image Rotator styles */
.rotator-preview-box {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 20px;
}
.rotator-preview-box img {
    max-width: 100%;
    max-height: 350px;
    transition: transform 0.3s ease;
}

/* Base64 box */
.base64-text-area {
    font-family: monospace;
    font-size: 12px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
}

/* Color picker cursor & color swatches */
.picker-container {
    position: relative;
    cursor: crosshair;
    display: inline-block;
    max-width: 100%;
}
.color-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.color-swatch-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* PDF Rotate thumbnails */
.pdf-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    margin-top: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}
.pdf-page-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.pdf-page-thumb-wrapper {
    height: 140px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}
.pdf-page-thumb-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
}
.pdf-page-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* Responsive Progress Container Overrides */
#progress-container .d-flex.align-items-center {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
#progress-container .progress-file-icon {
    flex-shrink: 0 !important;
}
#progress-container .flex-grow-1 {
    min-width: 0 !important;
    overflow: hidden !important;
}
#progress-container .flex-grow-1 > .d-flex {
    min-width: 0 !important;
    gap: 8px !important;
}
#progress-container .flex-grow-1 > .d-flex > div:first-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex-grow: 1 !important;
    display: flex !important;
    align-items: center !important;
}
#progress-file-name {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: inline-block !important;
    max-width: 140px !important;
    vertical-align: bottom !important;
}
#progress-file-size {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
#progress-status-text {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
#cancel-progress-btn {
    flex-shrink: 0 !important;
}

@media (max-width: 576px) {
    #progress-file-name {
        max-width: 80px !important;
    }
}
