/* Gemini 스타일 이미지 에디터 모달 */

.gemini-image-modal {
    position: fixed;
    inset: 0;
    background: rgba(19, 19, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    transition: opacity 0.25s ease;
}

/* ── 헤더 ─────────────────────────────────────────────────── */
.gemini-modal-header {
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-center {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Google Sans', 'Noto Sans KR', sans-serif;
}

.gemini-modal-header .icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.gemini-modal-header .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.gemini-modal-header .icon-btn:disabled {
    color: rgba(255, 255, 255, 0.22);
    cursor: not-allowed;
    pointer-events: none;
}

.gemini-modal-header .icon-btn svg {
    width: 18px;
    height: 18px;
}

.gemini-pill-btn {
    padding: 8px 24px;
    background: #a8c7fa;
    color: #041e49;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Google Sans', 'Noto Sans KR', sans-serif;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.gemini-pill-btn:hover  { background: #c2d8fb; }
.gemini-pill-btn:active { transform: scale(0.97); }

/* ── 캔버스 영역 ──────────────────────────────────────────── */
.gemini-canvas-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 32px;
}

#image-canvas {
    border-radius: 24px;
    display: block;
    box-shadow:
        0 0 40px rgba(68, 138, 255, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
}

#text-input-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* ── 플로팅 툴바 그룹 ─────────────────────────────────────── */
.gemini-floating-group {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    user-select: none;
    z-index: 100;
}

.pill-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(28, 28, 30, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

/* 컬러 팔레트 */
.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    outline: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s, outline-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.color-dot:hover { transform: scale(1.2); }

.color-dot.active {
    border-color: rgba(255, 255, 255, 0.9);
    outline-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.15);
}

/* 드래그 핸들 */
.drag-handle {
    color: rgba(255, 255, 255, 0.35);
    cursor: grab;
    display: flex;
    align-items: center;
    padding: 4px 2px;
    transition: color 0.15s;
    border-radius: 4px;
}

.drag-handle:hover  { color: rgba(255, 255, 255, 0.7); }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg    { width: 16px; height: 16px; }

/* 도구 버튼 */
.tool-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.tool-btn.active {
    background: rgba(168, 199, 250, 0.2);
    color: #a8c7fa;
}

.tool-btn svg { width: 18px; height: 18px; }

/* ── 텍스트 입력 오버레이 아이템 ──────────────────────────── */
.text-overlay-input {
    position: absolute;
    background: transparent;
    border: none;
    outline: 2px dashed rgba(168, 199, 250, 0.55);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 20px;
    font-family: sans-serif;
    font-weight: 600;
    min-width: 90px;
    cursor: text;
    pointer-events: auto;
    caret-color: #a8c7fa;
    background-clip: padding-box;
}

/* ── 진입 애니메이션 ──────────────────────────────────────── */
@keyframes gemini-modal-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gemini-image-modal:not(.hidden) {
    animation: gemini-modal-in 0.22s ease forwards;
}
