/* ─── Butonlar ─── */
.btn,
.nextButton,
.nextButton01,
.popupButton,
.leftButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-full);
    background-color: var(--brand-primary);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast), color var(--transition-fast);
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow-btn);
}

.nextButton,
.nextButton01 {
    margin: var(--space-md) auto 0;
    padding: 0 36px;
    min-height: var(--input-height);
    width: auto;
    min-width: 180px;
    font-size: 15px;
    letter-spacing: 0.04em;
}

.nextButton01 {
    line-height: 1;
}

.card.active .nextButton,
.card.active .nextButton01,
.card.active .sendAgainButton {
    opacity: 1;
    pointer-events: auto;
}

.nextButton:hover,
.nextButton01:hover,
.popupButton:not(.leftButton):hover {
    background-color: var(--brand-primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(197, 108, 25, 0.38);
}

.nextButton:active,
.nextButton01:active {
    transform: translateY(0);
    box-shadow: var(--shadow-btn);
}

.leftButton {
    background: var(--dark-bar);
    margin-right: 8px;
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-sm);
}

.leftButton:hover {
    background: #333;
    transform: translateY(-1px);
}

/* ─── Form alanları ─── */
.form-input,
.form-select {
    width: 100%;
    min-height: var(--input-height);
    height: var(--input-height);
    padding: 0 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    margin-bottom: var(--space-md);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.42);
    font-weight: 300;
}

.form-input:hover,
.form-select:hover {
    border-color: var(--input-border-focus);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    background-color: var(--input-bg-focus);
    box-shadow: var(--input-shadow-focus);
}

.form-input.invalid,
.form-select.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-soft);
}

.form-input:disabled,
.form-select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Select — özel ok */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c56c19' d='M1 1l5 5 5-5' stroke='%23c56c19' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.form-select option {
    background: #fff;
    color: var(--text);
    padding: 8px;
}

/* ─── Custom select (styled dropdown list) ─── */
.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: var(--space-md);
}

.custom-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.custom-select-trigger {
    width: 100%;
    min-height: var(--input-height);
    height: var(--input-height);
    padding: 0 40px 0 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c56c19' d='M1 1l5 5 5-5' stroke='%23c56c19' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.custom-select-trigger.is-placeholder {
    color: rgba(0, 0, 0, 0.42);
    font-weight: 300;
}

.custom-select:hover .custom-select-trigger {
    border-color: var(--input-border-focus);
}

.custom-select-trigger:focus-visible,
.custom-select.is-open .custom-select-trigger {
    outline: none;
    border-color: var(--brand-primary);
    background-color: var(--input-bg-focus);
    box-shadow: var(--input-shadow-focus);
}

.custom-select.invalid .custom-select-trigger {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-soft);
}

.custom-select.is-disabled .custom-select-trigger {
    opacity: 0.65;
    cursor: not-allowed;
}

.custom-select .custom-select-native {
    margin-bottom: 0;
}

.custom-select-panel {
    display: none;
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: customSelectIn 0.16s ease;
}

.custom-select-panel.open {
    display: block;
}

@keyframes customSelectIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: inherit;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-select-list::-webkit-scrollbar {
    width: 6px;
}

.custom-select-list::-webkit-scrollbar-thumb {
    background: rgba(200, 98, 26, 0.35);
    border-radius: var(--radius-full);
}

.custom-select-option {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.35;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.custom-select-option.is-placeholder {
    color: var(--text-muted);
}

.custom-select-option:hover:not(.is-disabled),
.custom-select-option:focus {
    background: var(--brand-primary-soft);
    color: var(--text);
}

.custom-select-option.is-selected {
    background: var(--brand-accent-bg);
    color: var(--brand-primary-hover);
    font-weight: 500;
}

.custom-select-option.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.custom-select.is-open .custom-select-trigger {
    border-color: var(--brand-primary);
    background-color: var(--input-bg-focus);
    box-shadow: var(--input-shadow-focus);
}

#methodSelectionInput {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity var(--transition), transform var(--transition);
}

#methodSelectionInput.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ─── Özel checkbox ─── */
.checkbox-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: var(--space-md) 0;
}

.checkbox-toggle {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-toggle:hover .custom-checkbox-mark {
    border-color: var(--brand-primary-hover);
    box-shadow: 0 0 0 3px var(--brand-primary-soft);
}

.checkbox-row .custom-checkbox-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    pointer-events: auto;
    z-index: 3;
}

.checkbox-row .custom-checkbox-mark {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius-sm);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.checkbox-row .custom-checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
    margin-top: -2px;
}

.checkbox-row .custom-checkbox-input:focus-visible + .custom-checkbox-mark {
    box-shadow: var(--input-shadow-focus);
}

.checkbox-row .custom-checkbox-input:checked + .custom-checkbox-mark {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.checkbox-row .custom-checkbox-input:checked + .custom-checkbox-mark::after {
    transform: rotate(45deg) scale(1);
}

.checkboxLabel {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.checkboxLabel a {
    color: var(--link-color);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.checkboxLabel a:hover {
    color: var(--link-hover);
}

/* ─── Cinsiyet seçici (modern pill toggle) ─── */
.genderSelector {
    background-color: var(--input-bg);
    height: 44px;
    border-radius: var(--radius-full);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
    width: min(100%, 220px);
    border: 1px solid var(--input-border);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 0;
}

.genderSelectorRow {
    position: absolute;
    z-index: 9;
    inset: 0;
    display: flex;
    border-radius: var(--radius-full);
}

.genderSelectorCol {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    line-height: 44px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 0;
    font-family: inherit;
    border-radius: var(--radius-full);
    z-index: 2;
}

.genderSelectorCol:hover {
    color: var(--text);
}

.genderSelectorCol.active {
    color: #fff;
}

.genderSelectorSwitch {
    width: calc((100% - var(--gs-inset) * 2 - var(--gs-gap)) / 2);
    border-radius: var(--radius-full);
    background-color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(197, 108, 25, 0.35);
    top: var(--gs-inset);
    left: var(--gs-inset);
    position: absolute;
    height: calc(100% - var(--gs-inset) * 2);
    z-index: 1;
    transform: translateX(0);
    transition: transform var(--transition);
}

.genderSelector.female .genderSelectorSwitch {
    transform: translateX(0);
}

.genderSelector.male .genderSelectorSwitch {
    transform: translateX(calc(100% + var(--gs-gap)));
}

.genderSelector.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-soft);
}

/* ─── Loader ─── */
.loader {
    animation: rotate 2s linear infinite;
    transform-origin: center center;
    position: absolute;
    height: 40px;
    width: 40px;
    right: 20px;
    top: 20px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
}

.card.active .loader.active {
    opacity: 1;
}

.card.card--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    z-index: 98;
    border-radius: inherit;
}

.card.card--loading > .loader.active {
    top: 50%;
    left: 50%;
    right: auto;
    margin-top: -24px;
    margin-left: -24px;
    width: 48px;
    height: 48px;
    z-index: 99;
}

.loader .path {
    stroke: var(--brand-primary);
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 89, 200; stroke-dashoffset: -35px; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124px; }
}

/* ─── Toast bildirimleri ─── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: min(400px, calc(100vw - 32px));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 280px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px) scale(0.96);
    transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.toast.toast--visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.toast.toast--exit {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
    transition-duration: 0.22s;
}

.toast::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.toast.error {
    background: linear-gradient(135deg, #e63c2f 0%, #c62828 100%);
}

.toast.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

.toast.success {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.toast.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

.toast.warning {
    background: linear-gradient(135deg, rgb(197, 108, 25) 0%, rgb(160, 82, 12) 100%);
}

.toast.warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E");
}

@media (max-width: 600px) {
    .toast-container {
        top: auto;
        bottom: 20px;
        right: 16px;
        left: 16px;
        align-items: center;
    }

    .toast {
        min-width: unset;
        width: 100%;
        transform: translateY(20px) scale(0.96);
    }

    .toast.toast--visible {
        transform: translateY(0) scale(1);
    }

    .toast.toast--exit {
        transform: translateY(20px) scale(0.96);
    }
}

/* ─── Modal / Popup ─── */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 35, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--surface);
    width: min(100%, 520px);
    max-height: min(90vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: scale(0.92) translateY(16px);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal.modal-lg {
    width: min(100%, 860px);
    max-height: min(92vh, 800px);
}

.modal-header {
    padding: 20px 28px 16px;
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    color: var(--brand-primary);
    flex-shrink: 0;
    text-align: left;
}

.modal-body {
    padding: 24px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    line-height: 1.6;
    color: var(--text);
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: relative;
}

.modal-body.legal-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

.modal-body.legal-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.modal-body.legal-content p,
.modal-body.legal-content li,
.modal-body.legal-content h1,
.modal-body.legal-content h2,
.modal-body.legal-content h3,
.modal-body.legal-content h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.legal-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
}

.modal-body.legal-content table {
    width: auto;
    max-width: none;
    min-width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

.modal-body.legal-content td,
.modal-body.legal-content th {
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
    vertical-align: top;
    padding: 6px 10px;
}

.modal-body.legal-content img {
    max-width: 100%;
    height: auto;
}

.modal-body.legal-content h1,
.modal-body.legal-content h2,
.modal-body.legal-content h3 {
    color: var(--brand-primary);
    margin-top: 1em;
}

.popupButton {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    bottom: auto;
    right: auto;
    min-height: 44px;
    padding: 0 20px;
    font-size: 13px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.popupButton.leftButton {
    background: var(--dark-bar);
    color: #fff;
}

.modal-footer .popupButton {
    flex: 1 1 auto;
    max-width: 280px;
}

@media (max-width: 600px) {
    .modal-footer .popupButton {
        max-width: 100%;
        width: 100%;
    }
}
