/**
 * Image Editor Component Styles
 */

.image-editor {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.image-editor__viewport {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: var(--color-dark-alt, #1a1a1a);
    border: 1px solid var(--color-border, #333);
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.image-editor__viewport:active {
    cursor: grabbing;
}

.image-editor__viewport--square {
    aspect-ratio: 1 / 1;
    height: auto;
}

.image-editor__viewport--wide {
    aspect-ratio: 16 / 9;
    height: auto;
}

.image-editor__viewport--tall {
    aspect-ratio: 9 / 16;
    height: auto;
}

.image-editor__image {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    max-width: none;
    max-height: none;
    pointer-events: none;
    will-change: transform;
}

.image-editor__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.image-editor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    background-color: var(--color-dark-alt, #1a1a1a);
    border: 1px solid var(--color-border, #333);
    border-radius: 0.375rem;
    color: var(--color-light, #fff);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.image-editor__btn:hover {
    background-color: var(--color-dark, #252525);
    border-color: var(--color-brand, #B5FB02);
}

.image-editor__btn:active {
    transform: scale(0.95);
}

.image-editor__btn svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.image-editor__btn--center {
    width: auto;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.image-editor__btn--center svg {
    width: 1rem;
    height: 1rem;
}

.image-editor__zoom-info {
    font-size: 0.8125rem;
    color: var(--color-light-muted, #888);
    min-width: 3rem;
    text-align: center;
}

.image-editor__separator {
    width: 1px;
    height: 1.5rem;
    background-color: var(--color-border, #333);
    margin: 0 0.25rem;
}

.image-editor__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-light-muted, #888);
    gap: 0.5rem;
}

.image-editor__placeholder svg {
    width: 3rem;
    height: 3rem;
    opacity: 0.5;
}

.image-editor__placeholder-text {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .image-editor__controls {
        justify-content: center;
    }
    
    .image-editor__btn--center span {
        display: none;
    }
    
    .image-editor__btn--center {
        width: 2.25rem;
        padding: 0;
    }
}
