@import url('https://fonts.googleapis.com/css2?family=Geologica:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'LagunaC';
    src: url('/resource/fonts/lagunac.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



.refund-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.refund-container {
    max-width: 800px;
    width: 100%;
    background: #FFFFFF;
    border-radius: 32px;
}

.refund-card {
    padding: calc(20px + (40 - 20) * ((100vw - 375px) / (1440 - 375))) calc(24px + (48 - 24) * ((100vw - 375px) / (1440 - 375))) calc(40px + (60 - 40) * ((100vw - 375px) / (1440 - 375)));
}

.refund-title {
    font-family: 'LagunaC', 'Geologica', sans-serif;
    font-weight: 400;
    font-size: calc(22px + (32 - 22) * ((100vw - 375px) / (1440 - 375)));
    line-height: calc(30px + (42 - 30) * ((100vw - 375px) / (1440 - 375)));
    text-align: center;
    color: #000000;
    margin-bottom: calc(30px + (40 - 30) * ((100vw - 375px) / (1440 - 375)));
}

.form-section {
    margin-bottom: calc(30px + (40 - 30) * ((100vw - 375px) / (1440 - 375)));
}

.section-title {
    font-family: 'Geologica';
    font-weight: 500;
    font-size: calc(16px + (20 - 16) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    margin-bottom: calc(16px + (24 - 16) * ((100vw - 375px) / (1440 - 375)));
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: calc(20px + (28 - 20) * ((100vw - 375px) / (1440 - 375)));
}

.form-label {
    font-family: 'Geologica';
    font-weight: 300;
    font-size: calc(13px + (15 - 13) * ((100vw - 375px) / (1440 - 375)));
    line-height: calc(20px + (24 - 20) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    display: block;
    margin-bottom: calc(8px + (12 - 8) * ((100vw - 375px) / (1440 - 375)));
}

.form-input {
    width: 100%;
    background: #F9F9F9;
    border: none;
    border-radius: calc(24px + (32 - 24) * ((100vw - 375px) / (1440 - 375)));
    padding: calc(14px + (18 - 14) * ((100vw - 375px) / (1440 - 375))) calc(18px + (24 - 18) * ((100vw - 375px) / (1440 - 375)));
    font-family: 'Geologica';
    font-weight: 300;
    font-size: calc(13px + (15 - 13) * ((100vw - 375px) / (1440 - 375)));
    line-height: calc(16px + (20 - 16) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    outline: none;
}

.form-input::placeholder {
    color: #B4B4B4;
}

.form-textarea {
    width: 100%;
    background: #F9F9F9;
    border: none;
    border-radius: calc(24px + (32 - 24) * ((100vw - 375px) / (1440 - 375)));
    padding: calc(14px + (18 - 14) * ((100vw - 375px) / (1440 - 375))) calc(18px + (24 - 18) * ((100vw - 375px) / (1440 - 375)));
    font-family: 'Geologica';
    font-weight: 300;
    font-size: calc(13px + (15 - 13) * ((100vw - 375px) / (1440 - 375)));
    line-height: calc(16px + (20 - 16) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    outline: none;
    resize: none;
}

.form-textarea::placeholder {
    color: #B4B4B4;
}

.form-row {
    display: flex;
    gap: calc(12px + (20 - 12) * ((100vw - 375px) / (1440 - 375)));
}

.form-row .form-group {
    flex: 1;
}

.card-number-row {
    display: flex;
    gap: calc(8px + (12 - 8) * ((100vw - 375px) / (1440 - 375)));
}

.card-part {
    flex: 1;
    text-align: center;
}

.refund-method {
    display: flex;
    gap: calc(20px + (32 - 20) * ((100vw - 375px) / (1440 - 375)));
    margin-bottom: calc(24px + (32 - 24) * ((100vw - 375px) / (1440 - 375)));
    flex-wrap: wrap;
}

.method-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: 'Geologica';
    font-weight: 400;
    font-size: calc(14px + (16 - 14) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    flex-shrink: 0;
}

.method-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.method-radio__custom {
    width: 20px;
    height: 20px;
    border: 2px solid #000000;
    border-radius: 50%;
    position: relative;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.method-radio input:checked + .method-radio__custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    background: #C23A3C;
    border-radius: 50%;
}

.method-container {
    position: relative;
    min-height: 160px;
    transition: min-height 0.4s cubic-bezier(0.2, 0.9, 0.1, 1);
}

.method-container.customer-active.individual {
    min-height: 160px;
}

.method-container.customer-active.legal {
    min-height: 280px;
}

.method-container.refund-active.card {
    min-height: 200px;
}

.method-container.refund-active.account {
    min-height: 320px;
}

.method-block {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(-15px);
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.method-block.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    position: relative;
}

.refund-submit {
    width: 100%;
    background: #C23A3C;
    border-radius: calc(38.5px + (50 - 38.5) * ((100vw - 375px) / (1440 - 375)));
    border: none;
    padding: calc(16px + (20 - 16) * ((100vw - 375px) / (1440 - 375)));
    font-family: 'Geologica';
    font-weight: 400;
    font-size: calc(16px + (18 - 16) * ((100vw - 375px) / (1440 - 375)));
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: calc(20px + (30 - 20) * ((100vw - 375px) / (1440 - 375)));
}

.refund-submit:hover {
    opacity: 0.85;
}

.error-text {
    color: #ff4d77 !important;
}

.error-text::placeholder {
    color: #ff4d77 !important;
}

.btn-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: calc(24px + (32 - 24) * ((100vw - 375px) / (1440 - 375))) 0;
}

.form-checkbox__input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.form-checkbox__label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Geologica';
    font-weight: 300;
    font-size: calc(11px + (13 - 11) * ((100vw - 375px) / (1440 - 375)));
    line-height: calc(13px + (16 - 13) * ((100vw - 375px) / (1440 - 375)));
    color: #000000;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.form-checkbox__box {
    position: relative;
    width: 24px;
    height: 24px;
    border: 1.5px solid #000000;
    border-radius: 4px;
    background: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.form-checkbox__box svg {
    width: 20px;
    height: 20px;
    position: absolute;
    z-index: 1;
}

.form-checkbox__box svg path {
    stroke: #000000;
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    opacity: 0;
    transition: stroke-dashoffset 0.25s cubic-bezier(0.4, 0, 0.23, 1), opacity 0.2s ease;
}

.form-checkbox__input:checked ~ .form-checkbox__label .form-checkbox__box svg path {
    animation: drawCheck 0.35s cubic-bezier(0.4, 0, 0.23, 1) 0.1s forwards;
}

.form-checkbox__input:not(:checked) ~ .form-checkbox__label .form-checkbox__box svg path {
    animation: eraseCheck 0.35s cubic-bezier(0.4, 0, 0.23, 1) forwards;
}

@keyframes drawCheck {
    0% { stroke-dashoffset: 30; opacity: 0; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes eraseCheck {
    0% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 30; opacity: 0; }
}

.privacy-link {
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-link:hover {
    color: #C23A3C;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 32px;
    max-width: 400px;
    width: 90%;
    margin: 0 auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #000000;
    font-weight: 300;
    z-index: 50;
}

.modal-body {
    text-align: center;
    padding: 48px 24px 40px 24px;
}

.modal-text {
    font-family: 'Geologica';
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    color: #000000;
    margin-bottom: 32px;
}

.modal-btn {
    background: #C23A3C;
    border-radius: 38.5px;
    border: none;
    padding: 14px 28px;
    font-family: 'Geologica';
    font-weight: 400;
    font-size: 16px;
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.modal-btn:hover {
    opacity: 0.85;
}

.signature-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.signature-preview {
    flex: 1;
    min-width: 200px;
    padding: 16px 20px;
    background: #F9F9F9;
    border-radius: 20px;
    color: #999;
    font-size: 14px;
}

.signature-preview img {
    max-width: 100%;
    max-height: 60px;
}

.signature-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.signature-btn:hover {
    border-color: #C23A3C;
    background: #fff5f5;
}

.signature-clear {
    padding: 14px 20px;
    background: none;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

.signature-clear:hover {
    color: #C23A3C;
}

.signature-modal {
    max-width: 480px;
}

#signatureCanvas {
    width: 100%;
    height: 200px;
    border: 2px solid #eee;
    border-radius: 16px;
    background: white;
    cursor: crosshair;
    touch-action: none;
    margin: 10px 0;
}

.signature-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.modal-btn-secondary:hover {
    background: #e0e0e0;
}

button,
button:focus,
button:active,
.refund-submit,
.refund-submit:focus,
.refund-submit:active,
.form-checkbox__input,
.form-checkbox__input:focus,
.form-checkbox__input:active,
.form-input,
.form-input:focus,
.form-input:active,
.method-radio input,
.method-radio input:focus,
.method-radio input:active,
.signature-btn,
.signature-btn:focus,
.signature-btn:active,
.signature-clear,
.signature-clear:focus,
.signature-clear:active {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #F9F9F9 inset !important;
    -webkit-text-fill-color: #000000 !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: #F9F9F9 !important;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
    position: absolute;
    right: 0;
}

@media (max-width: 768px) {
    body { background: #ffffff; }
    .refund-container { max-width: 100%; border-radius: 0; }
    .form-row { flex-direction: column; gap: 16px; }
}

@media (min-width: 1440px) {
    .refund-container { max-width: 900px; }
}

.form-checkbox__box.error {
    border-color: #ff4d77 !important;
    box-shadow: 0 0 0 3px rgba(255, 77, 119, 0.2);
}

.card,
[class*="card"] {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

input.error-text,
textarea.error-text {
    color: #ff4d77 !important;
    -webkit-text-fill-color: #ff4d77 !important;
    caret-color: #ff4d77 !important;
}

input.error-text:hover,
textarea.error-text:hover {
    color: #ff4d77 !important;
    -webkit-text-fill-color: #ff4d77 !important;
}

input.error-text:focus,
textarea.error-text:focus {
    color: #ff4d77 !important;
    -webkit-text-fill-color: #ff4d77 !important;
    outline: none;
}

.premium-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.premium-select__trigger {
    background: #F9F9F9;
    border-radius: 32px;
    padding: 16px 20px;
    font-family: 'Geologica', sans-serif;
    font-size: 15px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.premium-select__trigger:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.premium-select__value {
    flex: 1;
}

.premium-select__arrow {
    width: 24px;
    height: 24px;
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.premium-select.open .premium-select__arrow {
    transform: rotate(180deg);
}

.premium-select__options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
}

.premium-select.open .premium-select__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.premium-select__options-inner {
    padding: 8px 0;
}

.premium-select__option {
    padding: 14px 20px;
    font-family: 'Geologica', sans-serif;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.premium-select__option:hover {
    background: #F5F5F5;
    color: #C23A3C;
    padding-left: 28px;
}

.premium-select__option.selected {
    background: #F0F0F0;
    color: #C23A3C;
    font-weight: 500;
}

.premium-select__options::-webkit-scrollbar {
    width: 6px;
}

.premium-select__options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.premium-select__options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.premium-select__options::-webkit-scrollbar-thumb:hover {
    background: #C23A3C;
}


.cash-notice {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #F9F9F9;
    border-radius: 32px;
    padding: 20px 24px;
    margin-top: 24px;
}

.cash-notice-icon {
    flex-shrink: 0;
}

.cash-notice-icon img {
    width: 56px;
    height: 56px;
}

.cash-notice-text {
    flex: 1;
}

.cash-notice-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.cash-notice-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

#purchaseStoreBlock {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.2, 0.9, 0.1, 1), opacity 0.3s ease, margin 0.3s ease;
    margin: 0;
    padding: 0;
}

#purchaseStoreBlock.show {
    max-height: 200px;
    opacity: 1;
    margin-bottom: calc(20px + (28 - 20) * ((100vw - 375px) / (1440 - 375)));
}

#purchaseStoreBlock .form-group {
    margin-bottom: 0;
}

#purchaseStoreBlock[style*="display: block"] {
    animation: fadeSlideRight 0.3s cubic-bezier(0.2, 0.9, 0.1, 1) forwards;
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

