.cs-main-calc {
    width: 100%;
    max-width: var(--cs-calc-max-width, 700px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 24px;
    box-sizing: border-box;
}

.cs-main-calc-fields {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cs-main-calc-field {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    border: 1px solid #E6E6E6;
    border-radius: 8px;
    padding: 12px 16px;
}

.cs-main-calc-field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.cs-main-calc-label,
.cs-main-calc-currency {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #3A3A3A;
}

.cs-main-calc-currency {
    width: 32px;
    flex: none;
    text-align: center;
    margin-right: 20px;
}

.cs-main-calc-amount-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-main-calc-amount {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    outline: none;
    padding: 0;
    background: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #3A3A3A;
}

.cs-main-calc-flag-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    padding: 0 20px 0 0;
    cursor: pointer;
}

.cs-main-calc-flag-badge:focus {
    box-shadow: none;
}

.cs-main-calc-country-dropdown .cs-dropdown-arrow {
    right: 0;
}

.cs-main-calc-country-dropdown .cs-dropdown-panel {
    left: 0;
    right: 0;
    width: auto;
    max-height: none;
    overflow: visible;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
}

.cs-main-calc-search-wrap {
    position: relative;
    margin-bottom: 4px;
}

.cs-main-calc-search {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #D3D3D3;
    border-radius: 6px;
    padding: 8px 40px 8px 16px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #3A3A3A;
    outline: none;
}

.cs-main-calc-search::placeholder {
    color: #999999;
}

.cs-main-calc-search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.cs-main-calc-country-list {
    max-height: 280px;
    overflow-y: auto;
}

.cs-main-calc-country-empty {
    padding: 8px 16px;
    text-align: center;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #999999;
}

.cs-main-calc-country-dropdown .cs-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    padding: 8px 40px 8px 16px;
    color: #3A3A3A;
}

.cs-main-calc-country-dropdown .cs-dropdown-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.cs-main-calc-country-dropdown .cs-dropdown-item.selected {
    background-color: transparent;
    font-weight: 400;
}

.cs-main-calc-country-dropdown .cs-dropdown-item.selected:hover {
    background-color: #f3f5f9;
}

.cs-main-calc-flag {
    display: block;
    width: 32px;
    height: 32px;
    border: 0.667px solid #E6E6E6;
    border-radius: 12px;
    overflow: hidden;
    flex: none;
}

.cs-main-calc-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.cs-main-calc-country-dropdown {
    position: static;
}

.cs-main-calc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 24px;
    height: 24px;
}

.cs-main-calc-footer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
}

.cs-main-calc-footer-spacer {
    flex: none;
    width: 24px;
}

.cs-main-calc-note {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    color: #3A3A3A;
}

.cs-main-calc-fee {
    text-decoration: underline;
    text-underline-position: from-font;
    cursor: pointer;
}

.cs-main-calc-buttons {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.cs-main-calc-btn {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
    line-height: 24px;
}

.cs-main-calc-btn-inquiry {
    background: #F6F6F6;
    color: #0F2A44;
}

.cs-main-calc-btn-inquiry:hover {
    background: #EAEAEA;
    text-decoration: none;
}

.cs-main-calc-btn-send {
    background: #00CC4C;
    color: #fff;
}

.cs-main-calc-btn-send:hover {
    background: #00B844;
    text-decoration: none;
}

@media (max-width: 768px) {
    /* 모바일은 Hero가 height:auto, 데스크톱용으로 늘린 패널 높이를 좁은 화면에 맞게 원래 값으로 복귀 */
    .cs-main-calc-country-list {
        max-height: 240px;
    }
}

@media (max-width: 480px) {
    .cs-main-calc-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-main-calc-arrow {
        align-self: center;
    }

    .cs-main-calc-arrow img {
        transform: rotate(90deg);
    }

    .cs-main-calc-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-main-calc-footer-spacer {
        display: none;
    }

    .cs-main-calc-buttons {
        flex-direction: column;
    }
}

body.cs-widget-page {
    margin: 0;
    background: transparent;
}
