/* =========================================================
   RESPONSIVE — LAPTOP
   ========================================================= */
@media (max-width: 1199px) {
    .profile-v2-hero {
        grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
    }

    .profile-v2-user {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
    }

    .profile-v2-avatar {
        width: 92px;
        height: 92px;
    }

    .profile-v2-card {
        padding: 16px;
    }
}

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (max-width: 1023px) {
    .profile-v2-hero {
        grid-template-columns: 1fr;
    }

    .profile-v2-card+.profile-v2-card {
        border-left: 0;
        border-top: 1px solid var(--profile-border);
    }

    .profile-v2-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-v2-details__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-v2-hero {
        grid-template-columns: 1fr;
    }

    .profile-v2-card+.profile-v2-card {
        border-left: 0;
        border-top: 1px solid var(--profile-border);
    }
}

@media (max-width: 1023px) {
    .profile-v2-promo {
        grid-template-columns: 56px minmax(0, 1fr) auto;
        gap: 14px;
    }

    .profile-v2-promo__visual {
        grid-column: 1;
        grid-row: 1;
    }

    .profile-v2-promo__content {
        grid-column: 2;
        grid-row: 1;
    }

    .profile-v2-promo__time {
        grid-column: 3;
        grid-row: 1;
        min-width: 170px;
    }

    .profile-v2-promo__action {
        grid-column: 2 / -1;
        grid-row: 2;
        min-width: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .profile-v2-promo__button {
        min-width: 180px;
    }

    .profile-v2-promo__hint {
        margin-top: 0;
        text-align: left;
    }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 767px) {
    .profile-page-v2__stack {
        gap: 12px;
    }

    .profile-v2-hero {
        border-radius: 10px;
    }

    .profile-v2-user {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 12px;
    }

    .profile-v2-avatar {
        width: 82px;
        height: 82px;
    }

    .profile-v2-avatar__camera {
        width: 30px;
        height: 30px;
    }

    .profile-v2-card {
        padding: 14px;
    }

    .profile-v2-meta {
        margin-top: 14px;
    }

    .profile-v2-meta__item+.profile-v2-meta__item {
        padding-left: 14px;
    }

    .profile-v2-user__actions {
        grid-column: 1 / -1;
    }

    .profile-v2-connection {
        min-height: 48px;
        grid-template-columns: 36px minmax(90px, 1fr) auto;
    }

    .profile-v2-connection__value {
        grid-column: 2 / -1;
        max-width: none;
        margin-top: -8px;
        text-align: left;
    }

    .profile-v2-stats {
        gap: 8px;
    }

    .profile-v2-stat {
        min-height: 94px;
        padding: 11px;
        grid-template-columns: minmax(0, 1fr) 68px;
    }

    .profile-v2-stat__value {
        font-size: 19px;
    }

    .profile-v2-details__grid {
        grid-template-columns: 1fr;
    }

    .settings-v2-card {
        position: relative;
        scroll-margin-top: 90px;
    }
}

@media (max-width: 767px) {

    .profile-v2-promo {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 0;

        border-radius: 16px;
    }

    /* полноценная верхняя шапка */

    .profile-v2-promo__visual {
        width: 100%;
        min-height: 108px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 9px;

        padding: 16px;

        background:
            radial-gradient(circle at 50% 0%,
                rgba(255, 255, 255, .18),
                transparent 65%),
            rgba(255, 255, 255, .035);

        border-bottom: 1px solid rgba(255, 255, 255, .10);
    }

    .profile-v2-promo__visual-icon {
        width: 52px;
        height: 52px;

        border-radius: 16px;

        font-size: 22px;

        box-shadow:
            0 10px 28px rgba(15, 10, 50, .25),
            0 0 0 6px rgba(255, 255, 255, .07);
    }

    .profile-v2-promo__visual-caption {
        display: block;

        color: rgba(255, 255, 255, .68);

        font-size: 9px;
        font-weight: 700;

        text-align: center;
        text-transform: uppercase;
        letter-spacing: .09em;
    }

    /* текст теперь реально 100% */

    .profile-v2-promo__content {
        width: 100%;

        padding: 18px 16px;
    }

    .profile-v2-promo__badge {
        margin-bottom: 9px;
    }

    .profile-v2-promo__title {
        width: 100%;

        margin-bottom: 7px;

        font-size: 18px;
    }

    .profile-v2-promo__text {
        width: 100%;
        max-width: none;

        font-size: 13px;
        line-height: 1.5;
    }

    .profile-v2-promo__progress {
        width: 100%;
        max-width: none;

        height: 5px;

        margin-top: 15px;
    }

    /* таймер отдельным полноценным блоком */

    .profile-v2-promo__time {
        width: auto;

        margin: 0 16px;
        padding: 14px;

        border-radius: 12px;

        background: rgba(15, 12, 46, .20);
        border: 1px solid rgba(255, 255, 255, .08);
    }

    .profile-v2-promo__time-label {
        margin-bottom: 10px;
    }

    .profile-v2-promo__timer {
        display: grid;

        grid-template-columns:
            minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr);

        width: 100%;
    }

    .profile-v2-promo__timer-item {
        width: 100%;
    }

    .profile-v2-promo__timer-item strong {
        width: 100%;
        height: 50px;

        font-size: 24px;
    }

    .profile-v2-promo__separator {
        display: flex;
        align-items: center;
        justify-content: center;

        height: 50px;

        padding: 0;
    }

    /* кнопка снизу */

    .profile-v2-promo__action {
        width: 100%;

        padding: 16px;
    }

    .profile-v2-promo__button {
        width: 100%;
        min-height: 50px;

        font-size: 14px;

        border-radius: 10px;
    }

    .profile-v2-promo__hint {
        margin-top: 7px;
    }
}

@media (max-width: 767px) {

    .profile-v2-alert {
        width: 100%;

        margin-bottom: 12px;

        border-left-width: 1px;
        border-top: 4px solid #dc3942;

        border-radius: 14px;
    }

    /* ШАПКА */

    .profile-v2-alert__summary {
        display: grid !important;

        grid-template-columns: 46px minmax(0, 1fr) 28px;
        grid-template-areas:
            "icon heading chevron"
            "badge badge badge";

        gap: 10px 12px;

        width: 100%;
        min-height: 0;

        padding: 14px;

        align-items: center;
    }

    .profile-v2-alert__icon {
        grid-area: icon;

        width: 46px;
        height: 46px;

        border-radius: 12px;

        font-size: 20px;
    }

    .profile-v2-alert__heading {
        grid-area: heading;

        width: 100%;
        min-width: 0;
    }

    .profile-v2-alert__heading strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .profile-v2-alert__heading span {
        margin-top: 2px;

        font-size: 11px;
        line-height: 1.35;
    }

    .profile-v2-alert__chevron {
        grid-area: chevron;

        width: 28px;
        height: 28px;

        border-radius: 8px;

        background: rgba(220, 57, 66, .07);
    }

    .profile-v2-alert__badge {
        grid-area: badge;

        justify-self: start;

        display: inline-flex;
        align-items: center;

        margin-top: 2px;
        padding: 5px 8px;

        font-size: 9px;
    }

    /* ТЕЛО */

    .profile-v2-alert__body {
        width: 100%;

        padding: 14px;
    }

    .profile-v2-alert__message {
        width: 100%;

        margin-bottom: 12px;
        padding: 11px 12px;

        border-radius: 9px;

        background: #fff6f6;

        font-size: 12px;
    }

    /* CTA */

    .profile-v2-alert__actions {
        display: grid;

        grid-template-columns: 1fr;

        width: 100%;
        gap: 8px;
    }

    .profile-v2-alert__button {
        width: 100%;
        min-width: 0;
        min-height: 58px;

        grid-template-columns: 38px minmax(0, 1fr) 20px;
        gap: 11px;

        padding: 9px 11px;

        border-radius: 11px;

        text-align: left;
    }

    .profile-v2-alert__button-icon {
        width: 38px;
        height: 38px;

        border-radius: 9px;

        font-size: 17px;
    }

    .profile-v2-alert__button-content strong {
        font-size: 13px;
    }

    .profile-v2-alert__button-content small {
        margin-top: 2px;

        font-size: 10px;
    }

    .profile-v2-alert__button-arrow {
        justify-self: end;

        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .profile-v2-alert--warning {
        border-top-color: #d98a12;
    }

    .profile-v2-alert--warning .profile-v2-alert__chevron {
        background: rgba(217, 138, 18, .08);
    }
}

@media (max-width: 767px) {
    .profile-v2-user {
        align-items: start;
    }

    .profile-v2-meta {
        grid-template-columns: 1fr 1fr;
    }

    .profile-v2-user__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .profile-v2-user__actions .profile-v2-button {
        width: 100%;
        min-height: 44px;
    }

    .profile-v2-channels__header {
        margin-bottom: 12px;
    }

    .profile-v2-channels__title {
        font-size: 15px;
    }

    .profile-v2-channel {
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-areas:
            "icon content"
            "action action";
        gap: 10px 11px;
        padding: 12px;
        border-radius: 11px;
    }

    .profile-v2-channel__icon {
        grid-area: icon;
    }

    .profile-v2-channel__content {
        grid-area: content;
    }

    .profile-v2-channel__action {
        grid-area: action;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .profile-v2-channel__button {
        width: 100%;
        min-height: 44px;
        font-size: 12px;
    }

    .profile-v2-channel__check {
        min-height: 38px;
        border-radius: 8px;
        background: #f3f0ff;
        font-size: 11px;
    }

    .profile-v2-channel__name {
        font-size: 13px;
    }

    .profile-v2-channel__value {
        font-size: 11px;
    }

    .profile-v2-channel__hint {
        font-size: 10px;
    }
}

/* =========================================================
   RESPONSIVE — SMALL MOBILE
   ========================================================= */
@media (max-width: 420px) {
    .profile-v2-user {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .profile-v2-avatar {
        width: 72px;
        height: 72px;
    }

    .profile-v2-user__name {
        font-size: 19px;
    }

    .profile-v2-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-v2-stat {
        grid-template-columns: 1fr;
        min-height: 105px;
    }

    .profile-v2-stat__chart,
    .profile-v2-stat__donut {
        display: none;
    }
}

@media (max-width: 420px) {
    .profile-v2-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .profile-v2-meta__item+.profile-v2-meta__item {
        padding-left: 0;
        padding-top: 12px;
        border-left: 0;
        border-top: 1px solid var(--profile-border);
    }
}

@media (max-width: 359px) {
    .profile-v2-promo__content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .profile-v2-promo__time {
        margin-left: 14px;
        margin-right: 14px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .profile-v2-promo__action {
        padding-left: 14px;
        padding-right: 14px;
    }

    .profile-v2-promo__title {
        font-size: 17px;
    }

    .profile-v2-promo__timer-item strong {
        height: 46px;
        font-size: 20px;
    }

    .profile-v2-alert__summary,
    .profile-v2-alert__body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .profile-v2-alert__summary {
        grid-template-columns: 42px minmax(0, 1fr) 26px;
        gap: 9px;
    }

    .profile-v2-alert__icon {
        width: 42px;
        height: 42px;
    }

    .profile-v2-alert__heading strong {
        font-size: 13px;
    }

    .profile-v2-alert__button {
        grid-template-columns: 36px minmax(0, 1fr) 18px;
    }
}

