/* Кнопка генерации отчёта */
.gs-calc-report-btn-wrap {
    width: 100%;
    margin: 18px 0 24px 0;
    padding: 0;
    box-sizing: border-box;
}

.gs-calc-report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 14px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ff1732 0%, #e80720 100%);
    color: #fff;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(239, 51, 64, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    box-sizing: border-box;
}

.gs-calc-report-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 14px 30px rgba(239, 51, 64, .28);
}

.gs-calc-report-btn:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.gs-calc-report-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
}

.gs-calc-report-btn__icon svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media screen and (max-width: 768px) {
    .gs-calc-report-btn-wrap {
        margin: 14px 0 20px 0;
    }

    .gs-calc-report-btn {
        min-height: 54px;
        font-size: 16px;
        border-radius: 9px;
    }
}

/* Модальное окно выбора формата */
.gs-calc-report-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .52);
    box-sizing: border-box;
}

.gs-calc-report-modal.is-open {
    display: flex;
}

.gs-calc-report-modal__box {
    width: min(420px, 100%);
    padding: 28px 24px 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    box-sizing: border-box;
}

.gs-calc-report-modal__title {
    margin: 0 0 8px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.gs-calc-report-modal__subtitle {
    margin: 0 0 20px;
    color: #7c8490;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.gs-calc-report-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gs-calc-report-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 12px 16px;
    border: 0;
    border-radius: 9px;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.gs-calc-report-modal__btn:hover {
    transform: translateY(-1px);
}

.gs-calc-report-modal__btn--pdf {
    background: #ef3340;
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 51, 64, .22);
}

.gs-calc-report-modal__btn--png {
    background: #252b35;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 43, 53, .18);
}

.gs-calc-report-modal__close {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    border: 0;
    background: transparent;
    color: #7c8490;
    font-family: Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
}

.gs-calc-report-modal__btn:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}

@media screen and (max-width: 420px) {
    .gs-calc-report-modal__actions {
        grid-template-columns: 1fr;
    }
}

/* Скрытый шаблон отчёта (для PNG и предпросмотра) */
.gs-calc-report-offscreen {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 820px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.gs-calc-report {
    width: 820px;
    padding: 32px 32px 28px;
    background: #fff;
    color: #252b35;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.45;
    box-sizing: border-box;
}

.gs-calc-report * {
    box-sizing: border-box;
}

.gs-calc-report__header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e6eaf0;
}

.gs-calc-report__header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.gs-calc-report__contacts-block {
    flex-shrink: 0;
}

.gs-calc-report__contacts-columns {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.gs-calc-report__contacts-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gs-calc-report__contacts-col--telegram {
    padding-top: 0;
}

.gs-calc-report__contact--consult {
    margin-top: 0;
}

.gs-calc-report__contact--no-icon {
    padding-left: 46px;
}

.gs-calc-report__logo img {
    display: block;
    max-width: 170px;
    width: auto;
    height: auto;
}

.gs-calc-report__logo-tagline {
    display: none;
}

.gs-calc-report__contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gs-calc-report__contact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gs-calc-report__contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    overflow: hidden;
    border-radius: 8px;
}

.gs-calc-report__contact-icon img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.gs-calc-report__contact-icon--max img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.gs-calc-report__contact-icon--telegram img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transform: scale(0.78);
}

.gs-calc-report__contact-icon--phone {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.gs-calc-report__contact-icon--phone img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    transform: scale(0.78);
}

.gs-calc-report__contact-label {
    margin: 0;
    color: #7c8490;
    font-size: 10px;
    line-height: 1.2;
}

.gs-calc-report__contact-value {
    display: inline-block;
    width: auto;
    max-width: max-content;
    margin: 1px 0 0;
    padding: 0;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.gs-calc-report__contact-link {
    display: inline-block;
    width: auto;
    max-width: max-content;
    color: #252b35;
    text-decoration: none !important;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.gs-calc-report__contact-link:hover,
.gs-calc-report__contact-link:active,
.gs-calc-report__contact-link:focus,
.gs-calc-report__contact-link:visited {
    color: #252b35;
    text-decoration: none !important;
    outline: none;
}

.gs-calc-report__contact-hint {
    display: none;
}

.gs-calc-report__card--measure .gs-calc-report__card-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 12px;
    line-height: 1.3;
}

.gs-calc-report__measure-price {
    color: #ef1f2f;
    font-size: 13px;
    line-height: 1.3;
    position: relative;
    top: 1px;
}

.gs-calc-report__card--measure .gs-calc-report__measure-free {
    margin: 6px 0 0;
    color: #5cb87a;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.gs-calc-report__card--deadline .gs-calc-report__deadline-text {
    margin: 6px 0 0;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.gs-calc-report__main {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 18px;
}

.gs-calc-report__photo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 0;
    background: #fff;
    border: none;
    border-radius: 0;
}

.gs-calc-report__photo img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    border: 1px solid #d8dde5;
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}

.gs-calc-report__product-title {
    margin: 0 0 14px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
}

.gs-calc-report__specs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gs-calc-report__spec {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin: 0 0 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid #eef1f5;
}

.gs-calc-report__spec:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gs-calc-report__spec-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #ef3340;
    font-size: 14px;
    line-height: 1;
}

.gs-calc-report__spec-label {
    margin: 0;
    color: #7c8490;
    font-size: 11px;
    line-height: 1.3;
}

.gs-calc-report__spec-value {
    margin: 2px 0 0;
    color: #252b35;
    font-size: 13px;
    line-height: 1.35;
}

.gs-calc-report__spec-value--sub {
    color: #7c8490;
    font-size: 11px;
}

.gs-calc-report__spec-with-thumb {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    margin-top: 6px;
}

.gs-calc-report__spec--furn .gs-calc-report__spec-label {
    margin-bottom: 2px;
}

.gs-calc-report__spec--furn .gs-calc-report__spec-with-thumb {
    margin-top: 6px;
}

.gs-calc-report__spec-with-thumb .gs-calc-report__spec-value {
    flex: 0 0 auto;
}

.gs-calc-report__spec-thumb {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    margin-left: 22px;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.gs-calc-report__spec-thumb img {
    display: block;
    width: auto;
    height: 60px;
    max-width: none;
    object-fit: contain;
}

.gs-calc-report__spec--furn .gs-calc-report__spec-thumb img {
    height: 56px;
}

.gs-calc-report__price-block {
    position: relative;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e6eaf0;
}

.gs-calc-report__price-label {
    margin: 0 0 4px;
    color: #7c8490;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gs-calc-report__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gs-calc-report__price {
    margin: 0;
    color: #ef1f2f;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 36px;
    line-height: 1;
    font-weight: 700;
}

.gs-calc-report__price-note {
    margin: 8px 0 0;
    color: #7c8490;
    font-size: 10px;
    line-height: 1.35;
    max-width: 92%;
}

.gs-calc-report__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.gs-calc-report__card {
    padding: 12px 10px;
    background: #fff;
    border: 1px solid #e6eaf0;
    border-radius: 9px;
    text-align: center;
}

.gs-calc-report__card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0 auto 8px;
    color: #ef3340;
    font-size: 18px;
    line-height: 1;
}

.gs-calc-report__card-title {
    margin: 0 0 4px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.gs-calc-report__card-text {
    margin: 0;
    color: #7c8490;
    font-size: 10px;
    line-height: 1.35;
}

.gs-calc-report__bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.gs-calc-report__block {
    padding: 14px 12px;
    background: #f8f9fb;
    border: 1px solid #e6eaf0;
    border-radius: 9px;
}

.gs-calc-report__block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

.gs-calc-report__block-list {
    margin: 0;
    padding: 0 0 0 16px;
    color: #4e5663;
    font-size: 10px;
    line-height: 1.45;
}

.gs-calc-report__block-list li {
    margin-bottom: 4px;
}

.gs-calc-report__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 6px;
    padding: 22px 24px 24px;
    background: #f3f5f8;
    border-top: 1px solid #e6eaf0;
    border-radius: 0 0 4px 4px;
    min-height: 130px;
}

.gs-calc-report__footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 320px;
}

.gs-calc-report__footer-right .gs-calc-report__contacts-columns {
    justify-content: flex-end;
}

.gs-calc-report__footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gs-calc-report__qr {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
}

.gs-calc-report__qr img {
    display: block;
    width: 72px;
    height: 72px;
}

.gs-calc-report__thanks {
    margin: 0;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}

.gs-calc-report__date {
    margin: 4px 0 0;
    color: #7c8490;
    font-size: 10px;
    line-height: 1.3;
}

.gs-calc-report__footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gs-calc-report__loading {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .75);
}

.gs-calc-report__loading.is-visible {
    display: flex;
}

.gs-calc-report__loading-text {
    padding: 16px 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 15px;
}

/* Ручное изменение итоговой цены — только по двойному клику на сумму */

.gs-calc-price-mobile-slot {
    display: none;
}

@media screen and (max-width: 768px) {
    body.single-calc .gs-calc-price-under-photo--mobile {
        width: 100%;
        margin: 0 0 18px;
    }

    body.single-calc .gs-calc-price-under-photo--mobile + .gs-calc-report-btn-wrap {
        margin-top: 0;
    }
}

.gs-calc-price-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10002;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .52);
    box-sizing: border-box;
}

.gs-calc-price-modal.is-open {
    display: flex;
}

.gs-calc-price-modal__box {
    width: min(400px, 100%);
    padding: 28px 24px 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
    box-sizing: border-box;
}

.gs-calc-price-modal__title {
    margin: 0 0 8px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.gs-calc-price-modal__subtitle {
    margin: 0 0 18px;
    color: #7c8490;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.gs-calc-price-modal__label {
    display: block;
    margin: 0 0 8px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.gs-calc-price-modal__input {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #d8dde5;
    border-radius: 10px;
    color: #252b35;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.gs-calc-price-modal__input:focus {
    border-color: #ef3340;
    box-shadow: 0 0 0 3px rgba(239, 51, 64, .12);
}

.gs-calc-price-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gs-calc-price-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border: 0;
    border-radius: 9px;
    font-family: ArialBold, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.gs-calc-price-modal__btn:hover {
    transform: translateY(-1px);
}

.gs-calc-price-modal__btn--save {
    background: #ef3340;
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 51, 64, .22);
}

.gs-calc-price-modal__btn--cancel {
    background: #f3f5f8;
    color: #4e5663;
}
