.deco20-viewer-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.deco20-viewer-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	padding: 12px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
}

.deco20-viewer-controls label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 140px;
	font-size: 13px;
	color: #333;
}

.deco20-viewer-controls label.deco20-range-field {
	min-width: 200px;
	flex: 1 1 200px;
}

.deco20-viewer-controls label > span {
	font-weight: 600;
}

.deco20-viewer-controls input,
.deco20-viewer-controls select {
	max-width: 100%;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
}

.deco20-viewer-controls input[type="range"] {
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	accent-color: #2f6fed;
	cursor: pointer;
}

.deco20-viewer-controls output {
	display: inline-block;
	min-width: 3ch;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f0f4ff;
	color: #1f3b7a;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: 12px;
	align-self: flex-start;
}

.deco20-range-field {
	position: relative;
}

.deco20-viewer-apply {
	padding: 8px 14px;
	border: 0;
	border-radius: 6px;
	background: #2f6fed;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.deco20-viewer-apply:hover {
	background: #2458c8;
}

.deco20-3d-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* کادر پهن و افقی */
    min-height: 400px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #f5f5f5;
    box-sizing: border-box;
}


.deco20-3d-viewer canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.deco20-viewer-message {
	position: absolute;
	inset: 12px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #333;
	font-size: 14px;
	text-align: center;
	pointer-events: none;
}

.deco20-viewer-message.is-error {
	color: #8a1f1f;
	background: rgba(255, 235, 235, 0.95);
}

.deco20-viewer-message.is-loading {
	color: #1f3b7a;
}
.deco20-viewer-wrap {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.deco20-controls-panel {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-top: none;
	border-radius: 0 0 8px 8px;
	overflow: hidden;
}

.deco20-panel-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 10px 14px;
	border: none;
	background: #f7f7f7;
	font-size: 14px;
	color: #333;
	cursor: pointer;
}

.deco20-panel-toggle-icon {
	width: 10px;
	height: 10px;
	border-right: 2px solid #555;
	border-bottom: 2px solid #555;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

.deco20-controls-panel:not(.is-open) .deco20-panel-toggle-icon {
	transform: rotate(-135deg);
}

.deco20-panel-body {
	max-height: 320px;
	overflow-y: auto;
	padding: 12px;
	transition: max-height 0.25s ease, padding 0.25s ease;
}

.deco20-controls-panel:not(.is-open) .deco20-panel-body {
	max-height: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.deco20-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	border-bottom: 1px solid #eee;
	margin-bottom: 12px;
}

.deco20-tab {
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-bottom: none;
	border-radius: 6px 6px 0 0;
	background: #fafafa;
	font-size: 13px;
	color: #555;
	cursor: pointer;
}

.deco20-tab.is-active {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.deco20-tab-panel {
	display: none;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
}

.deco20-tab-panel.is-active {
	display: flex;
}
.deco20-unit-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    box-sizing: border-box;
    color: #fff;
    background: #1a1a2e;
    border: 1px solid #30304a;
    border-radius: 8px 8px 0 0;
}

.deco20-current-unit-label {
    flex: 1;
    overflow: hidden;
    color: #fff;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deco20-nav-btn {
    min-width: 115px;
    padding: 8px 12px;
    color: #fff;
    font: inherit;
    cursor: pointer;
    background: #ff8c25;
    border: 0;
    border-radius: 5px;
}

.deco20-nav-btn:hover {
    background: #e87511;
}

@media (max-width: 600px) {
    .deco20-unit-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }

    .deco20-current-unit-label {
        order: -1;
        flex-basis: 100%;
    }
}
