/* AR-примерка ковра. Виджет рядом с галереей карточки товара. */

.rs-ar-wrap {
    margin: 14px 0 8px;
}

.rs-ar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #0c5f33;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s ease;
    text-align: left;
}

.rs-ar-btn:hover,
.rs-ar-btn:focus {
    background: #094927;
    color: #fff;
}

.rs-ar-btn svg {
    flex: 0 0 auto;
}

.rs-ar-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #5a5a5a;
}

.rs-ar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.rs-ar-modal.is-open {
    display: flex;
}

.rs-ar-modal__box {
    position: relative;
    width: min(880px, 100%);
    max-height: 90vh;
    background: #fff;
    border-radius: 14px;
    padding: 14px 14px 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.rs-ar-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rs-ar-modal__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.rs-ar-modal__close {
    background: transparent;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #1a1a1a;
    padding: 4px 8px;
}

.rs-ar-modal__close:hover { color: #0c5f33; }

.rs-ar-viewer {
    width: 100%;
    height: 60vh;
    min-height: 320px;
    background: #f5f5f3;
    border-radius: 10px;
    overflow: hidden;
}

.rs-ar-modal__foot {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.rs-ar-modal__hint {
    flex: 1 1 auto;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.rs-ar-modal__ios-warn {
    background: #fef3c7;
    color: #7a4f00;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 10px;
    display: none;
}

.rs-ar-modal__ios-warn.is-on { display: block; }
