.rcc-open-btn {
    display: inline-block;
    margin: 14px 0 0;
    padding: 13px 26px;
    background: #24405A;
    color: #f3ecdd;
    border: none;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: filter .2s ease;
}
.rcc-open-btn:hover { filter: brightness(1.12); }

.rcc-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rcc-modal[hidden] { display: none; }

.rcc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 6, 0.72);
}

.rcc-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    overflow-y: auto;
    background: #1c1611;
    border: 1px solid rgba(230,214,180,0.16);
    border-radius: 16px;
    padding: 34px;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    color: #f3ecdd;
}

.rcc-modal-close {
    position: absolute;
    top: 16px;
    left: 18px;
    background: none;
    border: none;
    color: #a89a7e;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.rcc-modal-close:hover { color: #f3ecdd; }

.rcc-modal-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: start;
}
@media (max-width: 720px) {
    .rcc-modal-body { grid-template-columns: 1fr; }
}

.rcc-preview { display: flex; justify-content: center; }
.rcc-rug-wrap {
    width: 100%;
    max-width: 380px;
    filter: drop-shadow(0 20px 26px rgba(0,0,0,0.5));
}
.rcc-rug-wrap svg { width: 100%; height: auto; display: block; }

.rcc-zone-shape { cursor: pointer; transition: fill .35s ease, filter .15s ease; }
.rcc-zone-shape:hover { filter: brightness(1.1); }
.rcc-motif { transition: fill .35s ease; }

.rcc-controls h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 2px;
}
.rcc-sub {
    font-size: 12.5px;
    color: #a89a7e;
    margin: 0 0 14px;
}

.rcc-zone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid rgba(230,214,180,0.12);
}
.rcc-zone-row:first-child { border-top: none; }

.rcc-zone-name { font-size: 14.5px; font-weight: 600; }

.rcc-zone-control { display: flex; align-items: center; gap: 10px; }
.rcc-hex { font-size: 12px; color: #a89a7e; direction: ltr; min-width: 62px; text-align: center; }

.rcc-swatch-ring {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(230,214,180,0.3);
    display: flex; align-items: center; justify-content: center;
    padding: 3px;
}
.rcc-color-input {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 100%;
    border: none; border-radius: 50%;
    padding: 0; background: none; cursor: pointer;
}
.rcc-color-input::-webkit-color-swatch-wrapper { padding: 0; border-radius: 50%; }
.rcc-color-input::-webkit-color-swatch { border: none; border-radius: 50%; }
.rcc-color-input::-moz-color-swatch { border: none; border-radius: 50%; }

.rcc-reset-btn {
    width: 100%;
    margin-top: 16px;
    padding: 10px;
    background: transparent;
    color: #a89a7e;
    border: 1px solid rgba(230,214,180,0.25);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: color .2s ease, border-color .2s ease;
}
.rcc-reset-btn:hover { color: #f3ecdd; border-color: rgba(230,214,180,0.5); }

.rcc-presets {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(230,214,180,0.12);
}
.rcc-presets h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 2px;
}
.rcc-preset-list { display: flex; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.rcc-preset-btn {
    background: transparent;
    border: 1px solid rgba(230,214,180,0.2);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #a89a7e;
    font-size: 12px;
    font-family: inherit;
    transition: border-color .2s ease, color .2s ease;
}
.rcc-preset-btn:hover { border-color: #24405A; color: #f3ecdd; }
.rcc-preset-dots {
    display: grid;
    grid-template-columns: repeat(3, 10px);
    gap: 3px;
}
.rcc-preset-dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }

.rcc-confirm-btn {
    width: 100%;
    margin-top: 22px;
    padding: 14px;
    background: #24405A;
    color: #f3ecdd;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: filter .2s ease;
}
.rcc-confirm-btn:hover { filter: brightness(1.15); }

.rcc-note {
    font-size: 12.5px;
    color: #c9a45c;
    text-align: center;
    margin: 10px 0 0;
    min-height: 15px;
}
