/* Стили для страницы реферальной программы */
.referral-info {
    margin-bottom: 20px;
}

.referral-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.referral-programs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.referral-card {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.referral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.referral-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.card-toggle i {
    transition: transform 0.3s ease;
}

.referral-card.active .card-toggle i {
    transform: rotate(180deg);
}

.referral-body {
    padding: 0 15px 15px;
    display: none;
}

.referral-card.active .referral-body {
    display: block;
}

.referral-description {
    margin-bottom: 15px;
}

.referral-description p {
    margin-top: 0;
    margin-bottom: 10px;
}

.referral-description ul {
    padding-left: 20px;
    margin: 10px 0;
}

.referral-description li {
    margin-bottom: 5px;
}

.share-button {
    display: block;
    background-color: #40a7e3;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.share-button:active {
    background-color: #3590c3;
}

.earnings-chart {
    background-color: #272729;
    border-radius: 22px;
    padding: 15px;
    margin-bottom: 25px;
}

.earnings-chart h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.chart-container {
    height: 350px;
    overflow: hidden;
    position: relative;
}

.chart-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.chart-period {
    font-size: 12px;
    color: #ffffff;
}

.chart-area {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    margin-bottom: 10px;
}

.chart-minimap {
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 22px;
    margin-bottom: 10px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.level1 .legend-color {
    background-color: #3497ed;
}

.level2 .legend-color {
    background-color: #2373db;
}

.referral-stats h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background-color: #272729;
    border-radius: 22px;
    padding: 15px;
    text-align: center;
}

.stat-title {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
}

/* Новые стили для обновленной реферальной системы */
.referral-hero-banner {
    background: linear-gradient(135deg, #40a7e3 0%, #2d5aa0 100%) !important;
    border-radius: 22px;
    padding: 24px 20px;
    padding-top: 12px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
    box-shadow: none !important;
    border: none !important;
}

.referral-hero-banner h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 22px;
    font-weight: 700;
}

.referral-hero-banner p {
    margin-bottom: 0px;
    opacity: 0.9;
    font-size: 13px;
}

.referral-stats-counter {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px 10px;
}

.counter-item {
    flex: 1;
    text-align: center;
    padding: 4px 0;
}

.counter-divider {
    width: 1px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 12px;
}

.counter-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.counter-label {
    font-size: 12px;
    opacity: 0.8;
}

.referral-total-earnings {
    background-color: #272729;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.earnings-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.earnings-tab {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.earnings-tab.active {
    background-color: #3497ed;
    color: white;
}

.earnings-amount {
    margin-bottom: 10px;
}

.earnings-amount .amount {
    font-size: 32px;
    font-weight: 700;
}

.earnings-amount .currency {
    font-size: 24px;
    margin-left: 2px;
}

.earnings-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    color: #ffffff;
}

.earnings-change.positive {
    color: #3D9966;
}

.earnings-change.negative {
    color: #DC4E41;
}

.referral-chart-card {
    background-color: #272729;
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.period-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.period-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
}

.period-btn.active {
    background-color: #40a7e3;
    color: white;
    box-shadow: 0 4px 12px rgba(64, 167, 227, 0.3);
}

.chart-container {
    height: 180px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.level1 {
    background-color: #40a7e3;
}

.legend-color.level2 {
    background-color: #2373db;
}

.legend-label {
    font-size: 13px;
    color: #ffffff;
}

.referral-programs-section {
    margin-bottom: 0;
}

.referral-programs-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.programs-tabs {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.programs-tabs::-webkit-scrollbar {
    display: none;
}

.program-tab {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.05);
}

.program-tab.active {
    background-color: #3497ed;
    color: white;
}

.program-cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Кастомизация переключателя для рефералки */
#referral-toggle {
    margin: 20px 0;
}

#referral-toggle .toggle-switch__btn {
    color: white !important;
    font-size: 14px;
    font-weight: 500;
}

#referral-toggle .toggle-switch__btn--active {
    color: #000000 !important;
}

#referral-toggle .toggle-switch__indicator {
    background-color: white !important;
    border-radius: 25px !important;
}

.toggle-content {
    margin-top: 15px;
}

/* Горизонтальная лента карточек "Доступные реф" */
.programs-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.programs-scroll:active {
    cursor: grabbing;
}

/* Перетаскивание мышью как скролл на ПК */
.programs-scroll.dragging {
    cursor: grabbing;
    user-select: none;
}

.programs-scroll::-webkit-scrollbar {
    display: none;
}

.program-card-mini {
    min-width: 220px;
    background-color: #272729;
    border-radius: 18px;
    padding: 14px;
}

.program-card-mini .program-mini-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.program-card-mini .program-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 10px;
    background-color: #313131;
    background-size: 36px;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Для Font Awesome иконок в мини-карточках */
.program-card-mini .program-icon.d_s::before {
    font-size: 16px;
}

.program-card-mini .program-mini-title {
    font-size: 15px;
    font-weight: 600;
}

.program-card-mini .program-mini-desc {
    font-size: 12px;
    color: #ffffff;
    opacity: 0.9;
}

.program-card-mini .program-mini-percent {
    margin-left: auto;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: white;
    font-weight: 700;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.program-card {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.program-card-header {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.program-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    margin-right: 12px;
    background-color: #313131;
    background-size: 40px;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Для Font Awesome иконок */
.program-icon.d_s::before {
    font-size: 18px;
}

.program-title {
    flex: 1;
}

.program-title h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
}

.program-title p {
    margin: 0;
    font-size: 13px;
    color: #ffffff;
}

.card-toggle i {
    transition: transform 0.3s ease;
}

.program-card.active .card-toggle i {
    transform: rotate(180deg);
}

.program-card-body {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear, 
                padding 0.3s linear;
}

.program-card.active .program-card-body {
    padding: 0 15px 15px;
    max-height: 300px;
}

.rewards-info {
    margin-top: 15px;
}

/* Стили для rewards-info без фона */
.rewards-info.simple {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.rewards-info.simple .reward-item {
    margin-bottom: 12px;
}

.reward-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.reward-item:last-child {
    margin-bottom: 0;
}

.reward-badge {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: white;
    font-weight: 700;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    margin-right: 10px;
    min-width: 36px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.reward-desc {
    font-size: 14px;
    flex: 1;
}

.referral-stats-mini {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 3px;
}

.stat-label {
    font-size: 13px;
    color: #ffffff;
}

.referral-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background-color: rgba(255, 255, 255, 0.07);
    border: none;
    border-radius: 22px;
    padding: 10px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex: 1;
}

.action-btn:active {
    background-color: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .action-btn:hover {
        background-color: rgba(255, 255, 255, 0.12);
    }
}

.action-btn i {
    font-size: 16px;
}

.referral-qr-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.action-btn.success-copy {
    background-color: #3D9966;
}

.referral-faq-section {
    margin-bottom: 25px;
}

.referral-faq-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background-color: #272729;
    border-radius: 22px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    cursor: pointer;
}

.faq-question span {
    font-size: 15px;
    font-weight: 500;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s linear, 
                padding 0.3s linear;
}

.faq-item.active .faq-answer {
    padding: 0 15px 15px;
    max-height: 300px;
}

.faq-answer p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

/* Глобальная реферальная ссылка */
.global-ref-link {
    margin-top: 15px;
}

.ref-link-mode-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
}
.ref-link-mode-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.ref-link-mode-btn--active {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* Управление кодами (bottom-panel) — compact */
.ref-codes-panel {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}
@media (min-width: 600px) {
    .ref-codes-panel { max-height: 69vh; }
}

/* Header */
.rcp-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 8px;
}
.rcp-header__title {
    font-size: 17px;
    font-weight: 700;
    color: #f0f0f0;
}
.rcp-header__count {
    font-size: 13px;
    color: #7a8390;
    font-weight: 500;
}

/* Search */
.rcp-search {
    flex-shrink: 0;
    position: relative;
    padding: 0 20px 10px;
}
.rcp-search__icon {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(calc(-50% - 5px));
    color: rgba(255,255,255,0.25);
    font-size: 13px;
    pointer-events: none;
}
.rcp-search__input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #e0e0e0;
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    font-size: 13px;
    box-sizing: border-box;
}
.rcp-search__input::placeholder { color: rgba(255,255,255,0.2); }
.rcp-search__input:focus { outline: none; border-color: rgba(64,167,227,0.4); }

/* List */
.ref-codes-panel__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    padding: 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.ref-codes-panel__list::-webkit-scrollbar { width: 4px; }
.ref-codes-panel__list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Row — one line per code */
.rcp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.12s;
}
.rcp-row:hover { background: rgba(255,255,255,0.03); }

.rcp-row__code {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #eee;
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rcp-row__stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    flex-shrink: 0;
}
.rcp-row__stat i {
    font-size: 13px;
    color: rgba(255,255,255,0.25);
}

.rcp-row__btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.12s, color 0.12s;
    padding: 0;
}
.rcp-row__btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.rcp-row__btn--del:hover { color: #ff5050; background: rgba(255,60,60,0.1); }
.rcp-row__btn--copy.copied { color: #6fcf97; }
.rcp-row__btn-placeholder { width: 30px; flex-shrink: 0; }

/* Confirm row */
.rcp-row--confirm {
    background: rgba(255,60,60,0.04);
}
.rcp-row--confirm .rcp-row__code { color: rgba(255,255,255,0.5); }
.rcp-row__confirm-text {
    font-size: 12px;
    color: rgba(255,80,80,0.7);
    white-space: nowrap;
    margin-left: auto;
}
.rcp-row__btn--yes { color: #ff5050; }
.rcp-row__btn--yes:hover { background: rgba(255,60,60,0.15); }
.rcp-row__btn--no:hover { background: rgba(255,255,255,0.1); }

.rcp-empty {
    padding: 24px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}

/* Footer — create code */
.rcp-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.rcp-footer__input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e0e0e0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    box-sizing: border-box;
}
.rcp-footer__input::placeholder { color: rgba(255,255,255,0.2); }
.rcp-footer__input:focus { outline: none; border-color: rgba(64,167,227,0.4); }
.rcp-footer__btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #40a7e3 0%, #2d5aa0 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.15s;
}
.rcp-footer__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rcp-footer__btn:active:not(:disabled) { opacity: 0.8; }


.ref-link-container {
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 10px;
}

#global-ref-link {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px 12px;
    font-size: 14px;
}

.copy-global-link {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding-left: 3px;
}

.copy-global-link:active {
    background-color: rgba(255, 255, 255, 0.3);
}

.copy-global-link.copied {
    background-color: #3D9966;
}

.ref-link-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.highlight {
    color: #ffffff;
    font-weight: 700;
}

/* Стили для табов периода в разделе программ */
.programs-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.programs-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.program-earnings-tabs {
    display: flex;
    gap: 5px;
}

.program-period-tab {
    padding: 5px 10px;
    border-radius: 22px;
    font-size: 12px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.program-period-tab.active {
    background-color: #3497ed;
    color: white;
}

@media (max-width: 380px) {
    .programs-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Стили для карточки друзей */
.referral-friends-card {
    background: linear-gradient(135deg, #1e2128 0%, #2a2d38 100%);
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.referral-friends-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(64, 167, 227, 0.3);
}

.friends-bg-emoji {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.friends-bg-emoji span {
    position: absolute;
    font-size: 28px;
    opacity: 0.12;
    user-select: none;
}

.friends-count {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    position: relative;
    z-index: 1;
    will-change: contents;
}

.friends-label {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: inline-block;
    vertical-align: middle;
    position: relative;
    z-index: 1;
}

.friends-paid-badge {
    display: inline-block;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 600;
    color: #f0b840;
    background: rgba(240, 184, 64, 0.12);
    border: 1px solid rgba(240, 184, 64, 0.3);
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 6px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

/* Стили для двухрядной статистики */
.referral-stats-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 10px 8px;
}

.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Отступ снизу чтобы не залезать на нижнее меню */

/* Дополнительный отступ под последним аккордеоном */
.accordion-list .accordion-item:last-child {
    margin-bottom: 60px;
} 

.referral-qr-modal {
    padding: 24px;
    text-align: center;
}

.referral-qr-modal__hint {
    font-size: 14px;
    font-weight: 400;
    color: #B1B4B9;
    margin-bottom: 24px;
}

.referral-qr-modal__image-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    display: inline-block;
    max-width: calc(100% - 48px);
}

.referral-qr-modal__image {
    display: block;
    width: 100%;
    max-width: 256px;
    height: auto;
}

.referral-qr-modal__actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.referral-avatar-fallback {
    width: 100%;
    height: 100%;
}