/* Image Cropper Specific UI */

.hidden { display: none !important; }

.icr-input-section { margin-bottom: 30px; }

/* Cropping Area */
.icr-cropping-container, .icr-results-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 40px var(--shadow);
    animation: fadeIn 0.4s ease;
}

.icr-section-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
}

.icr-canvas-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    user-select: none;
    touch-action: none; /* Prevents screen scrolling while dragging on mobile */
}

.icr-canvas-wrapper img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    pointer-events: none; /* Image shouldn't interfere with mouse events */
}

/* The Draggable Selection Box */
.icr-crop-box {
    position: absolute;
    border: 2px dashed #fff;
    background: rgba(37, 99, 235, 0.3); /* Transparent Blue overlay */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); /* Dims the unselected area */
    cursor: crosshair;
    z-index: 10;
}

/* Results Area */
.icr-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.icr-preview-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.icr-header-flex {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.icr-preview-wrapper {
    width: 100%;
    height: 300px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    background-image: linear-gradient(45deg, var(--bg-input) 25%, transparent 25%), linear-gradient(-45deg, var(--bg-input) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--bg-input) 75%), linear-gradient(-45deg, transparent 75%, var(--bg-input) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.icr-preview-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.icr-controls-box {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.icr-controls-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

@media (max-width: 900px) {
    .icr-dashboard-grid { grid-template-columns: 1fr; }
    .icr-canvas-wrapper, .icr-canvas-wrapper img { max-height: 400px; }
}
