/* Formlar — vitrin */
.ws-form-page {
    padding: 48px 0 72px;
}

@media (max-width: 991.98px) {
    .ws-form-page {
        padding: 24px 0 48px;
    }
}

.ws-form-page__title {
    margin: 0 0 24px;
    font-size: 2rem;
}

.ws-form {
    width: 100%;
}

.ws-form__alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ws-form__alert--success {
    background: rgba(18, 183, 106, 0.12);
    color: #039855;
}

.ws-form__alert--error {
    background: rgba(240, 68, 56, 0.12);
    color: #d92d20;
}

/* Başarı modalı */
.ws-form-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    /* body’ye taşındığında transform ebeveyninden etkilenmesin */
    transform: none;
}

.ws-form-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ws-form-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 41, 41, 0.45);
    cursor: pointer;
}

.ws-form-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 48px rgba(25, 41, 41, 0.18);
    text-align: center;
}

.ws-form-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    color: #039855;
    background: rgba(18, 183, 106, 0.12);
}

.ws-form-modal__title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: #192929;
}

.ws-form-modal__body {
    margin: 0 0 20px;
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(25, 41, 41, 0.78);
}

.ws-form-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 11px 20px;
    border: 0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #ffffff;
    background: #192929;
    transition: background 0.2s ease, transform 0.15s ease;
}

.ws-form-modal__btn:hover {
    background: #0f1a1a;
}

.ws-form-modal__btn:focus-visible {
    outline: 2px solid #039855;
    outline-offset: 2px;
}

body.ws-form-modal-open {
    overflow: hidden;
}

.ws-form__hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

.ws-form__field {
    margin-bottom: 0;
    position: relative;
    overflow: visible;
}

.ws-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    overflow: visible;
}

.ws-form__cell--full {
    grid-column: 1 / -1;
}

.ws-form__cell--half {
    grid-column: span 1;
}

.ws-form__cell {
    position: relative;
    overflow: visible;
    min-width: 0;
}

/* Açık telefon menüsü yan sütunun üstünde kalsın */
.ws-form__cell:has(.ws-form-phone.is-open) {
    z-index: 30;
}

@media (max-width: 575.98px) {
    .ws-form__grid {
        grid-template-columns: 1fr;
    }

    .ws-form__cell--half {
        grid-column: 1 / -1;
    }

    /* Sütun modu: sol sütun alanları, ardından sağ sütun (order JS ile) */
    .ws-form--mobile-stack-columns .ws-form__grid {
        display: flex;
        flex-direction: column;
    }

    .ws-form--mobile-stack-columns .ws-form__cell {
        width: 100%;
    }
}

.ws-form__label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Kenarlıklı etiket — legend akışta yer kaplamasın (metin aşağı kaymasın) */
.ws-form--outlined-labels .ws-form__outline {
    position: relative;
    margin: 0;
    padding: 0;
    min-inline-size: 0;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    background: transparent;
}

.ws-form--outlined-labels .ws-form__outline-legend {
    position: absolute;
    top: 0;
    left: 10px;
    z-index: 2;
    float: none;
    width: auto;
    max-width: calc(100% - 24px);
    margin: 0;
    padding: 0 6px;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.2;
    color: inherit;
    background-color: var(--rr-common-white, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-form--outlined-labels .ws-form__outline > .ws-form__control,
.ws-form--outlined-labels .ws-form__outline > select.ws-form__control {
    display: block;
    width: 100%;
    height: 3rem;
    min-height: 3rem;
    margin: 0;
    padding: 0 0.85rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    line-height: 3rem;
    box-sizing: border-box;
}

.ws-form--outlined-labels .ws-form__outline > textarea.ws-form__control {
    display: block;
    width: 100%;
    height: auto;
    min-height: 7.5rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    line-height: 1.45;
    box-sizing: border-box;
    resize: vertical;
}

.ws-form--outlined-labels .ws-form__outline > .ws-form__control:focus,
.ws-form--outlined-labels .ws-form__outline > select.ws-form__control:focus,
.ws-form--outlined-labels .ws-form__outline > textarea.ws-form__control:focus {
    outline: none;
    box-shadow: none;
}

.ws-form--outlined-labels .ws-form__outline:focus-within {
    border-color: rgba(0, 0, 0, 0.45);
}

.ws-form--outlined-labels .ws-form__outline > .ws-form-phone {
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    min-height: 3rem;
    height: 3rem;
}

.ws-form--outlined-labels .ws-form__outline > .ws-form-phone:focus-within {
    box-shadow: none;
}

.ws-form--outlined-labels .ws-form__outline > .ws-form-phone .ws-form-phone__input {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 3rem;
}

.ws-form--outlined-labels .ws-form__outline > .ws-form__choices {
    padding: 0.75rem 0.85rem;
}

.ws-form--outlined-labels .ws-form__outline > input[type="file"].ws-form__control {
    height: auto;
    min-height: 3rem;
    line-height: 1.4;
    padding: 0.65rem 0.85rem;
}


.ws-form__req {
    color: #d92d20;
    margin-left: 2px;
}

.ws-form__control {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: inherit;
    font: inherit;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Seçim listesi — native dropdown (tema nice-select dışı) */
select.ws-form__control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    cursor: pointer;
}

select.ws-form__control::-ms-expand {
    display: none;
}

.ws-form__help {
    margin-top: 6px;
    font-size: 0.875rem;
    opacity: 0.75;
}

.ws-form__error {
    margin-top: 6px;
    font-size: 0.875rem;
    color: #d92d20;
}

/* Telefon: bayrak + alan kodu (ecommerce ile aynı kurallar) */
.ws-form-phone {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 2.85rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    overflow: visible;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    z-index: 1;
}

.ws-form-phone.is-open {
    z-index: 40;
}

.ws-form-phone:focus-within {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.ws-form-phone__dial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    min-width: 5.5rem;
    height: auto;
    margin: 0;
    padding: 0 0.55rem 0 0.7rem;
    border: 0;
    border-right: 1px solid #e4e7ec;
    border-radius: 8px 0 0 8px;
    background: #f8fafc;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    -webkit-appearance: none;
    appearance: none;
}

.ws-form-phone__dial:hover,
.ws-form-phone__dial:focus {
    background: #f2f4f7;
    outline: 0;
    box-shadow: none;
}

.ws-form-phone__flag {
    font-size: 1.05rem;
    line-height: 1;
}

.ws-form-phone__code {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.ws-form-phone__caret {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    color: #98a2b3;
}

.ws-form-phone__input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: auto;
    margin: 0;
    border: 0 !important;
    border-radius: 0 8px 8px 0;
    background: transparent;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #111827;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    resize: none;
}

.ws-form-phone__input:focus {
    outline: none;
    box-shadow: none;
}

.ws-form-phone__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    z-index: 50;
    max-height: 15rem;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    box-sizing: border-box;
    resize: none;
}

.ws-form-phone__menu[hidden] {
    display: none !important;
}

.ws-form-phone__menu-search {
    flex: 0 0 auto;
    padding: 0.55rem;
    border-bottom: 1px solid #eef2f6;
    box-sizing: border-box;
}

.ws-form-phone__search {
    display: block;
    width: 100%;
    height: 2.35rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d0d5dd !important;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.35;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    resize: none;
}

.ws-form-phone__search::-webkit-search-decoration,
.ws-form-phone__search::-webkit-search-cancel-button,
.ws-form-phone__search::-webkit-search-results-button,
.ws-form-phone__search::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.ws-form-phone__search:focus {
    border-color: #98a2b3 !important;
    outline: none;
    box-shadow: none;
}

.ws-form-phone__menu-list {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 11.5rem;
    box-sizing: border-box;
}

.ws-form-phone__option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111827;
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.ws-form-phone__option:hover,
.ws-form-phone__option:focus,
.ws-form-phone__option.is-active {
    background: #f2f4f7;
    outline: 0;
    box-shadow: none;
}

.ws-form-phone__option-flag {
    flex: 0 0 auto;
    font-size: 1.05rem;
    line-height: 1;
}

.ws-form-phone__option-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-form-phone__option-dial {
    flex: 0 0 auto;
    color: #667085;
    font-variant-numeric: tabular-nums;
}

.ws-form__choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ws-form__choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.ws-form__choice > input[type="checkbox"],
.ws-form__choice > input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.2em 0 0;
    flex-shrink: 0;
    accent-color: #101828;
    cursor: pointer;
}

.ws-form__choice-text {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
    padding-top: 0.05em;
}

.ws-form__doc-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.ws-form__doc-link:hover {
    opacity: 0.85;
}

.ws-form-modal__dialog--doc {
    max-width: min(720px, 100%);
    width: 100%;
    max-height: min(85vh, 780px);
    padding: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ws-form-modal__doc-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ws-form-modal__title--doc {
    flex: 1 1 auto;
    margin: 0;
    font-size: 1.05rem;
    text-align: left;
}

.ws-form-modal__doc-x {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #344054;
    padding: 0 4px;
}

.ws-form-modal__doc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px 20px;
    color: #1d2939;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

.ws-form-modal__doc-loading,
.ws-form-modal__doc-error {
    margin: 0;
    color: #667085;
}

.ws-form-modal__doc-error {
    color: #d92d20;
}

.ws-form-modal__doc-body ul,
.ws-form-modal__doc-body ol {
    margin: 0 0 12px;
    padding-left: 1.25rem;
}

.ws-form-modal__doc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ws-form__heading h3 {
    margin: 8px 0;
}

.ws-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 8px;
    background: #111;
    color: #fff;
    cursor: pointer;
}

.ws-form__submit:hover {
    opacity: 0.9;
}

.ws-form__actions {
    margin-top: 8px;
}
