/**
 * Image Rotate Styles
 * 이미지 회전/뒤집기 전용 스타일 (2컬럼 레이아웃)
 *
 * @package Zipper
 */

/* ===== 2컬럼 레이아웃 (데스크탑) ===== */
.rotate-main-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

.rotate-input-col {
    position: sticky;
    top: 20px;
}

.rotate-result-col {
    min-width: 0;
}

/* 입력 섹션 */
.rotate-input-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
}

.rotate-input-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rotate-input-title i {
    color: #d4af37;
}

/* 이미지 업로드 영역 */
.rotate-upload-area {
    border: 2px dashed #e8e4dc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #faf9f7;
}

.rotate-upload-area:hover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.rotate-upload-area.dragover {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
}

.rotate-upload-icon {
    font-size: 32px;
    color: #d4af37;
    margin-bottom: 8px;
}

.rotate-upload-text {
    font-size: 13px;
    color: #5f5a56;
    margin-bottom: 4px;
}

.rotate-upload-hint {
    font-size: 11px;
    color: #a09a94;
}

.rotate-upload-input {
    display: none;
}

/* 회전 버튼 그룹 */
.rotate-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.rotate-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
}

.rotate-action-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
}

.rotate-action-btn:active {
    transform: scale(0.98);
}

.rotate-action-btn i {
    font-size: 20px;
}

.rotate-action-btn span {
    font-size: 11px;
}

/* 현재 상태 표시 */
.rotate-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #faf9f7;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
}

.rotate-status-title {
    font-size: 12px;
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rotate-status-title i {
    color: #d4af37;
}

.rotate-status-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.rotate-status-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #5f5a56;
}

.rotate-status-item strong {
    color: #d4af37;
}

/* 액션 버튼 */
.rotate-actions {
    display: flex;
    gap: 8px;
}

.rotate-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rotate-btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
}

.rotate-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.rotate-btn-primary:disabled {
    background: #e8e4dc;
    color: #a09a94;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rotate-btn-secondary {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    color: #5f5a56;
}

.rotate-btn-secondary:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* 다운로드 드롭다운 */
.rotate-download-wrapper {
    position: relative;
    flex: 1;
}

.rotate-download-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
    display: none;
    z-index: 10;
}

.rotate-download-menu.show {
    display: block;
}

.rotate-download-item {
    padding: 10px 14px;
    font-size: 12px;
    color: #2d2a26;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rotate-download-item:first-child {
    border-radius: 6px 6px 0 0;
}

.rotate-download-item:last-child {
    border-radius: 0 0 6px 6px;
}

.rotate-download-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

.rotate-download-item i {
    width: 16px;
}

/* ===== 결과 영역 ===== */

/* 대기 상태 */
.rotate-waiting {
    text-align: center;
    padding: 60px 20px;
    color: #a09a94;
    background: #faf9f7;
    border: 1px dashed #e8e4dc;
    border-radius: 10px;
}

.rotate-waiting i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.rotate-waiting p {
    font-size: 14px;
}

/* 미리보기 영역 */
.rotate-preview-section {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    overflow: hidden;
}

/* 이미지 컨테이너 */
.rotate-image-container {
    position: relative;
    min-height: 300px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
    overflow: hidden;
}

.rotate-canvas {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

/* 이미지 정보 */
.rotate-image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #faf9f7;
    border-top: 1px solid #e8e4dc;
    font-size: 12px;
    color: #5f5a56;
}

.rotate-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rotate-info-item i {
    color: #d4af37;
}

/* 면책조항 */
.rotate-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: rgba(108, 117, 125, 0.08);
    border-radius: 8px;
    margin-top: 12px;
}

.rotate-disclaimer i {
    color: #6c757d;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.rotate-disclaimer-text {
    font-size: 12px;
    color: #5f5a56;
    line-height: 1.5;
}

.rotate-disclaimer-text strong {
    color: #2d2a26;
}

/* 숨김 */
.rotate-hidden {
    display: none !important;
}

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 900px) {
    .rotate-main-layout {
        grid-template-columns: 280px 1fr;
        gap: 16px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .rotate-main-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rotate-input-col {
        position: static;
    }

    .rotate-input-section {
        padding: 14px;
    }

    .rotate-actions {
        flex-direction: column;
    }

    .rotate-download-wrapper {
        width: 100%;
    }

    .rotate-image-container {
        min-height: 250px;
        max-height: 400px;
    }

    .rotate-canvas {
        max-height: 400px;
    }
}

/* ===== 반응형 - 작은 모바일 ===== */
@media (max-width: 480px) {
    .rotate-upload-area {
        padding: 16px;
    }

    .rotate-upload-icon {
        font-size: 28px;
    }

    .rotate-btn-group {
        gap: 6px;
    }

    .rotate-action-btn {
        padding: 10px 6px;
    }

    .rotate-action-btn i {
        font-size: 18px;
    }

    .rotate-image-container {
        min-height: 200px;
        max-height: 350px;
    }

    .rotate-canvas {
        max-height: 350px;
    }

    .rotate-image-info {
        flex-wrap: wrap;
        gap: 8px;
    }
}
