/* ══════════════════════════════════════════════════
   kimp-calc.css  - 글래스모피즘 김프 계산기
══════════════════════════════════════════════════ */

/* ── 버튼 ── */
.kimp-calc-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(57,208,216,0.12), rgba(88,166,255,0.08));
    border: 1px solid rgba(57,208,216,0.3);
    border-radius: 6px;
    color: #39d0d8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    margin-left: auto;  /* 오른쪽 끝으로 */
}

.kimp-calc-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.kimp-calc-btn:hover {
    background: linear-gradient(135deg, rgba(57,208,216,0.22), rgba(88,166,255,0.14));
    border-color: #39d0d8;
    box-shadow: 0 0 12px rgba(57,208,216,0.2);
}

/* ── 오버레이 ── */
.kimp-calc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 8, 16, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.kimp-calc-overlay.kimp-calc-visible {
    opacity: 1;
}

/* ── 글래스 패널 ── */
.kimp-calc-glass {
    width: 100%;
    max-width: 420px;
    background: rgba(20, 25, 34, 0.85);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(57,208,216,0.2);
    border-radius: 14px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 24px 64px rgba(0,0,0,0.6),
        0 0 40px rgba(57,208,216,0.06);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
}

.kimp-calc-overlay.kimp-calc-visible .kimp-calc-glass {
    transform: translateY(0);
}

/* ── 헤더 ── */
.kimp-calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(57,208,216,0.04);
}

.kimp-calc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #e6edf3;
}

.kimp-calc-title svg {
    width: 16px;
    height: 16px;
    color: #39d0d8;
}

.kimp-calc-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #636e7c;
    transition: all 0.2s;
}

.kimp-calc-close:hover { background: rgba(255,255,255,0.12); color: #e6edf3; }
.kimp-calc-close svg { width: 12px; height: 12px; }

/* ── 섹션 ── */
.kimp-calc-section {
    padding: 14px 18px 0;
}

.kimp-calc-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #636e7c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
}

/* ── 코인 select ── */
.kimp-calc-select {
    width: 100%;
    background: rgba(10,14,20,0.7);
    color: #e6edf3;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b95a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s;
}

.kimp-calc-select:focus { border-color: rgba(57,208,216,0.5); }

/* ── 코인 정보 카드 ── */
.kimp-calc-info {
    margin: 12px 18px 0;
    background: rgba(10,14,20,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
}

.kimp-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.kimp-calc-row:last-child { border-bottom: none; }

.kimp-calc-row-label {
    font-size: 12px;
    color: #8b95a8;
}

.kimp-calc-row-value {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    font-family: 'JetBrains Mono', monospace;
}

.kimp-calc-premium.high    { color: #3fb950; }
.kimp-calc-premium.low     { color: #f85149; }
.kimp-calc-premium.neutral { color: #8b95a8; }

/* ── 구분선 ── */
.kimp-calc-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 14px 18px 0;
}

/* ── 금액 입력 ── */
.kimp-calc-input-wrap {
    position: relative;
}

.kimp-calc-input {
    width: 100%;
    background: rgba(10,14,20,0.7);
    color: #e6edf3;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 7px;
    padding: 9px 48px 9px 12px;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.kimp-calc-input::-webkit-outer-spin-button,
.kimp-calc-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.kimp-calc-input:focus {
    border-color: rgba(57,208,216,0.5);
    box-shadow: 0 0 0 2px rgba(57,208,216,0.1);
}

.kimp-calc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #636e7c;
    pointer-events: none;
}

/* ── 결과 ── */
.kimp-calc-result {
    margin: 12px 18px 18px;
    background: rgba(57,208,216,0.04);
    border: 1px solid rgba(57,208,216,0.12);
    border-radius: 8px;
    overflow: hidden;
}

.kimp-calc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
    color: #8b95a8;
}

.kimp-calc-result-row:last-child { border-bottom: none; }

.kimp-calc-result-row span:last-child {
    font-size: 13px;
    font-weight: 600;
    color: #e6edf3;
    font-family: 'JetBrains Mono', monospace;
}

.kimp-calc-result-highlight {
    background: rgba(57,208,216,0.06);
    font-weight: 600;
    color: #e6edf3 !important;
}

.kimp-calc-result-highlight span:first-child { color: #e6edf3; }

.profit-positive { color: #3fb950 !important; }
.profit-negative { color: #f85149 !important; }

/* ══ 모바일 ══ */
@media (max-width: 768px) {
    .kimp-calc-btn span { display: none; }  /* 텍스트 숨기고 아이콘만 */
    .kimp-calc-btn {
        padding: 8px 10px;
        gap: 0;
    }
    .kimp-calc-btn svg { width: 16px; height: 16px; }

    .kimp-calc-glass {
        max-width: 100%;
        border-radius: 12px;
    }

    .kimp-calc-title { font-size: 13px; }

    .kimp-calc-row-label,
    .kimp-calc-result-row,
    .kimp-calc-label { font-size: 11px; }

    .kimp-calc-row-value,
    .kimp-calc-result-row span:last-child { font-size: 12px; }

    .kimp-calc-input { font-size: 13px; }
}
