/* User Cabinet: start page, profile, settings, policies, notifications */

/* The cabinet keeps the mobile design column (369px inside the 12px page
   padding) and centres it, so tablet and desktop do not pin it to the left. */
.b-cabinet-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 369px;
    margin: 0 auto;
    padding-top: 17px;
    /* Same growth as the phone --bottom-nav-offset, so the last button clears the nav on iOS. */
    padding-bottom: calc(40px + max(0px, calc(var(--safe-area-bottom) - 14px)));
    font-family: Manrope, sans-serif;
    color: #f6f6f6;
}

.b-cabinet-page .e-page-head {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.b-cabinet-page .e-page-back {
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 4px 0;
    color: #f6f6f6;
    background: none;
    border: 0;
    padding: 0;
}

.b-cabinet-page .e-page-back img {
    width: 24px;
    height: 24px;
}

.b-cabinet-page .e-page-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    color: #f6f6f6;
    margin: 0;
}

/* Gradient border wrapper around cabinet cards */
.b-cabinet-page .e-card-wrapper {
    --gradient-border-radius: 24px;
}

.b-cabinet-page .e-card-wrapper.m-banner {
    --gradient-border-radius: 56px;
}

/* Glassy card shared by cabinet screens */
.b-cabinet-card {
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.004) 100%);
    border-radius: 24px;
    padding: 12px 24px;
}

.b-cabinet-card.m-banner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    border-radius: 56px;
    padding: 24px;
    background-image:
        linear-gradient(90deg, rgba(2, 7, 10, 0.2) 0%, rgba(2, 7, 10, 0.2) 100%);
}

.b-cabinet-card.m-banner .main-action-btn {
    margin-top: 0;
}

.b-cabinet-card.m-banner .main-action-text {
    color: #091720;
}

.b-cabinet-card.m-banner .e-banner-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    color: #f6f6f6;
    text-align: center;
    margin: 0;
}

.b-cabinet-card.m-banner .e-banner-text {
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #c7cacb;
    text-align: center;
    margin: 4px 0 0;
}

.b-cabinet-card.m-banner .e-banner-link {
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #c7cacb;
    text-decoration: underline;
}

/* Menu / list rows */
.b-cabinet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 0;
    border-bottom: 0.5px solid #b4b3b3;
    background: none;
    padding: 0;
    text-align: left;
    text-decoration: none;
    color: #c7cacb;
}

.b-cabinet-row:last-child {
    border-bottom: 0;
}

.b-cabinet-row:hover {
    color: #c7cacb;
    text-decoration: none;
}

.b-cabinet-row .e-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.b-cabinet-row .e-row-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.b-cabinet-row .e-row-caption {
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #c7cacb;
    white-space: nowrap;
}

.b-cabinet-row .e-row-badge {
    align-items: center;
    background: #00e0ff;
    border-radius: 24px;
    box-sizing: border-box;
    color: #091720;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    height: 16px;
    justify-content: center;
    line-height: 14px;
    min-width: 16px;
    padding: 0 4px;
}

.b-cabinet-row.m-danger .e-row-caption {
    color: #ff8181;
}

.b-cabinet-row .e-row-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Profile rows (two-line) */
.b-cabinet-row.m-profile {
    height: auto;
    min-height: 60px;
    padding: 10px 0;
    cursor: pointer;
}

.b-cabinet-row.m-profile.m-readonly {
    cursor: default;
}

.b-cabinet-row .e-row-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.b-cabinet-row .e-row-caption.m-title {
    color: #f6f6f6;
}

.b-cabinet-row .e-row-value {
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    color: #c7cacb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b-cabinet-row .e-row-value.m-placeholder {
    color: #969da0;
}

.b-cabinet-card .e-delete-link {
    display: block;
    background: none;
    border: 0;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    text-align: left;
    color: #ff8181;
}

/* Full-screen field editor */
.b-cabinet-editor {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    background-color: #08161f;
    z-index: 1045;
    padding: calc(var(--safe-area-top, 0px) + 17px) 24px 24px;
    overflow-y: auto;
}

.b-cabinet-editor.m-open {
    display: flex;
}

.b-cabinet-editor .e-editor-subtitle {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
    color: #c7cacb;
    margin: 6px 0 0;
}

.b-cabinet-editor .e-editor-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.b-cabinet-editor .e-editor-save-wrapper {
    align-self: center;
}

.b-cabinet-editor .e-editor-save {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 80px;
    padding: 8px 12px;
    border: 0;
    border-radius: 56px;
    background: rgba(34, 211, 238, 0.01);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #f6f6f6;
}

.b-cabinet-editor .e-editor-error {
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #ff8181;
    text-align: center;
    margin: 0;
}

.b-cabinet-editor .e-editor-error.m-hidden {
    display: none;
}

.b-cabinet-editor .e-editor-link {
    background: none;
    border: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: #c7cacb;
    text-decoration: underline;
}

.b-cabinet-editor .e-editor-link.m-center {
    align-self: center;
}

/* Settings toggle switch */
.b-cabinet-row.m-toggle {
    cursor: pointer;
}

.b-cabinet-row .e-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.b-cabinet-row .e-toggle-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.b-cabinet-row .e-toggle-track {
    position: absolute;
    inset: 0;
    background: #b4b3b3;
    border-radius: 100px;
    transition: background 0.2s ease;
    pointer-events: none;
}

.b-cabinet-row .e-toggle-input:checked ~ .e-toggle-track {
    background: #22d3ee;
}

.b-cabinet-row .e-toggle-knob {
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 100px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.b-cabinet-row .e-toggle-input:checked ~ .e-toggle-knob {
    transform: translateX(20px);
}

/* Notifications list */
.b-notifications .e-notifications-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b-notifications .e-group-title {
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    color: #b4b3b3;
    margin: 0;
    padding: 10px 0;
}

.b-notifications .e-notifications-group.m-unread {
    position: relative;
    isolation: isolate;
}

.b-notifications .e-notifications-group.m-unread::before {
    content: '';
    position: absolute;
    inset: -4px -12px;
    background: rgba(246, 246, 246, 0.1);
    filter: blur(25px);
    pointer-events: none;
    z-index: -1;
}

.b-notifications .e-notifications-group.m-unread .e-group-title {
    font-weight: 700;
    color: #f6f6f6;
}

.b-notifications .e-notifications-group.m-unread .e-item-title,
.b-notifications .e-notifications-group.m-unread .e-item-text {
    color: #f6f6f6;
}

.b-notifications .e-notifications-group.m-unread .e-item-text {
    font-weight: 500;
}

.b-notifications .e-group-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.b-notifications .e-notifications-group.m-hidden {
    display: none;
}

.b-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.b-notification-item.m-has-link {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.b-notification-item .e-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    background-image:
        linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(246, 246, 246, 0.12) 100%);
}

.b-notification-item .e-item-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.b-notification-item .e-item-body {
    flex: 1;
    min-width: 0;
}

.b-notification-item .e-item-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    color: #b4b3b3;
    margin: 0;
}

.b-notification-item .e-item-text {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    color: #b4b3b3;
    margin: 2px 0 0;
}

.b-notification-item .e-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
    min-height: 24px;
}

.b-notification-item .e-item-link-wrapper {
    display: inline-block;
    margin-top: 8px;
}

.b-notification-item .e-item-link {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 8px 12px;
    border: 0;
    border-radius: 56px;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #f6f6f6;
    text-decoration: none;
}

.b-notification-item .e-item-link:hover {
    color: #f6f6f6;
    text-decoration: none;
}

.b-notification-item .e-item-time {
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    color: #b4b3b3;
    margin-left: auto;
    white-space: nowrap;
}

.b-notifications .e-notifications-more.m-hidden {
    display: none;
}

.b-notifications .e-notifications-more {
    align-self: center;
    background: none;
    border: 0;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 14px;
    color: #c7cacb;
    text-decoration: underline;
}

.b-notifications .e-notifications-empty {
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #969da0;
    text-align: center;
    margin: 24px 0 0;
}

/* Centered confirmation popup */
.b-confirm-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 22, 31, 0.64) 0%,
        rgba(8, 22, 31, 0.8) 100%
    );
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.b-confirm-dialog-backdrop.m-open {
    opacity: 1;
    pointer-events: auto;
}

.b-confirm-dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    width: calc(100% - 24px);
    max-width: 369px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.004) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 56px;
    padding: 32px 24px 24px;
    z-index: 1050;
    color: #f6f6f6;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.b-confirm-dialog.m-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.b-confirm-dialog .e-dialog-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    color: #f6f6f6;
    margin: 0;
}

.b-confirm-dialog .e-dialog-text {
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
    color: #f6f6f6;
    opacity: 0.9;
    margin: 12px 0 0;
}

.b-confirm-dialog .e-dialog-actions {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

.gradient-border-wrapper.m-inline {
    display: inline-block;
}

.b-confirm-dialog .e-dialog-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    min-width: 124px;
    padding: 8px 12px;
    border: 0;
    border-radius: 56px;
    background: rgba(34, 211, 238, 0.01);
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #f6f6f6;
    text-decoration: none;
    white-space: nowrap;
}

.b-confirm-dialog .e-dialog-btn:hover {
    color: #f6f6f6;
    text-decoration: none;
}

/* Unread dot on the bottom-nav cabinet tab */
.bottom-nav .nav-item:not(.center-nav-item) {
    position: relative;
}

.bottom-nav .nav-unread-dot {
    position: absolute;
    left: calc(50% + 5px);
    top: 17.5px;
    width: 4px;
    height: 4px;
}

/* Saved toast */
.b-cabinet-toast {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.004) 100%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 56px;
    padding: 32px 24px;
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.b-cabinet-toast.m-open {
    opacity: 1;
}

.b-cabinet-toast .e-text {
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    color: #f6f6f6;
}

/* Subscription management screen */
.b-cabinet-page .e-sub-section-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    color: #c7cacb;
    margin: 0 0 8px 4px;
}

.b-sub-manage-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 24px;
    padding: 20px 24px;
    background: rgba(34, 211, 238, 0.08);
}

.b-sub-manage-card .e-sub-plan-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.b-sub-manage-card .e-sub-plan-caption {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    color: #f6f6f6;
}

.b-sub-manage-card .e-sub-plan-expiry {
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #c7cacb;
}

.b-sub-manage-card .e-sub-plan-expiry.m-cancelled {
    color: #f6b85f;
    line-height: 16px;
}

.b-sub-manage-card .e-sub-change-btn,
.b-sub-manage-card .e-sub-resume-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1px solid rgba(246, 246, 246, 0.4);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #f6f6f6;
}

.b-sub-manage-card .e-sub-change-btn {
    text-decoration: none;
}

.b-sub-manage-card .e-sub-resume-btn {
    background: none;
}

/* Scheduled plan change block on the manage screen */
.b-pending-change {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
}

.b-pending-change .e-pending-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #c7cacb;
    margin: 0;
}

.b-pending-change .e-pending-text.m-warning {
    color: #f6b85f;
}

.b-pending-change .e-pending-cancel {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #ff8181;
    text-align: left;
}

.b-pending-change .e-pending-confirm {
    align-self: flex-start;
    padding: 8px 16px;
    border: 1px solid rgba(246, 246, 246, 0.4);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #f6f6f6;
    text-decoration: none;
}

/* Plan selection screen */
.b-cabinet-page .e-sub-select-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
    color: #f6f6f6;
    margin: 0 0 12px;
}

.b-cabinet-page .e-sub-select-intro-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.b-cabinet-page .e-sub-select-intro {
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    text-align: center;
    color: #c7cacb;
    margin: 0;
    overflow-wrap: anywhere;
}

.b-sub-provider-notice {
    padding: 12px 16px;
    margin: 0 0 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.b-sub-provider-notice.m-hidden {
    display: none;
}

.b-sub-provider-notice .e-text {
    margin: 0;
    font-size: 13px;
    line-height: 17px;
    text-align: center;
    color: #e8d9a0;
}

.b-sub-provider-notice .e-store-settings-link {
    display: block;
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    color: #c7cacb;
    text-decoration: underline;
}

/* Currency choice sits between the plans panel and the CTA: its gap to the
   panel matches the CTA gap, and the CTA wrapper gives the gap below it. */
.subscription-currency-choice.m-cabinet {
    margin-top: 16px;
}

.subscription-currency-choice.m-cabinet .b-filter-tabs.m-small {
    margin-bottom: 0;
}

.b-sub-tabs {
    width: 100%;
    margin: 16px 0;
}

.b-sub-tabs .e-tab.m-hidden {
    display: none;
}

.b-sub-panel-wrapper.m-hidden {
    display: none;
}

.b-sub-panel {
    padding: 24px;
}

/* Campaign terms under the plans span the full panel width (Figma 4693:21568) */
.b-sub-panel .b-campaign-note.m-cabinet {
    width: auto;
    margin: 24px -24px 0;
}

.b-sub-panel .e-sub-panel-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.b-sub-panel .e-sub-panel-icon {
    font-size: 24px;
    line-height: 28px;
}

.b-sub-panel .e-sub-panel-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
    color: #f6f6f6;
    margin: 0;
}

.b-sub-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
}

.b-sub-features .e-feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.b-sub-features .e-feature-label {
    flex: 1 1 auto;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    color: #b0b5b7;
    max-width: 150px;
}

.b-sub-features .e-feature-value {
    flex: 0 0 150px;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    color: #f6f6f6;
    text-align: center;
}

.b-sub-features .e-feature-check {
    flex: 0 0 150px;
    display: flex;
    justify-content: center;
}

.b-sub-features .e-feature-check img {
    display: block;
    width: 14px;
    height: auto;
}

.b-sub-panel .e-plan-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.b-sub-panel .e-plan-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    color: #f6f6f6;
}

.b-sub-panel .subscription-plan-price {
    line-height: 28px;
}

.b-sub-panel .subscription-plan-price-regular {
    bottom: 100%;
}

.b-cabinet-page .e-sub-cta-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 16px;
}

.b-cabinet-page .e-sub-cta-wrapper .main-action-btn:disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.b-cabinet-row.m-select {
    cursor: pointer;
}

.b-cabinet-row.m-select .e-row-value {
    font-weight: 600;
}

.b-bottom-sheet.m-language .e-body {
    padding: 19px 30px 20px;
    opacity: 1;
    color: #f6f6f6;
}

.b-bottom-sheet.m-language .e-option-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.b-bottom-sheet.m-language .e-option-item {
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #f6f6f6;
}

.b-bottom-sheet.m-language .e-option-item.m-selected {
    color: #00e0ff;
}
