
#rds-builder {
    /* max-width: 950px; */
}

#rds-builder h1 {
    font-size: 24px;
    margin-bottom: 24px;
    display: none;
}

#rds-builder h2 {
    font-size: 22px;
    margin-bottom: 18px;
    color: #444;
    text-align: left;
}

.rds-hidden {
    display: none;
}

.rds-step {
    margin-bottom: 32px;
    padding-bottom: 24px;
    /* border-bottom: 1px solid #e0e0e0; */
    max-width: 920px;
}

#rds-step-config {
    max-width: 920px;
}

.rds-step:last-child {
    border-bottom: none;
}

.rds-cpu-selector {
    position: relative;
    width: 100%;
}

.rds-cpu-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-size: 15px;
}

.rds-cpu-trigger:hover {
    border-color: #999;
}

.rds-cpu-trigger.rds-open {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.rds-cpu-trigger-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rds-cpu-trigger-name {
    font-weight: 700;
    font-size: 16px;
}

.rds-cpu-trigger-sub {
    font-size: 13px;
    color: #888;
}

.rds-cpu-trigger-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rds-cpu-trigger-price {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}

.rds-cpu-trigger-arrow {
    font-size: 14px;
    color: #999;
    transition: transform 0.2s;
}

.rds-cpu-trigger.rds-open .rds-cpu-trigger-arrow {
    transform: rotate(180deg);
}

.rds-cpu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    border: 2px solid #ddd;
    border-radius: 12px;
    background: #fff;
    z-index: 100;
    max-height: 560px;
    overflow-y: auto;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.rds-cpu-dropdown.rds-visible {
    display: block;
}

.rds-cpu-group-label {
    padding: 10px 18px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.rds-cpu-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}

.rds-cpu-item:last-child {
    border-bottom: none;
}

.rds-cpu-item:hover {
    background: #f5f8ff;
}

.rds-cpu-item.rds-selected {
    background: #eff6ff;
    border-left: 3px solid #2563eb;
    padding-left: 15px;
}

.rds-cpu-item.rds-archived {
    opacity: 0.45;
}

.rds-cpu-no-result {
    cursor: default;
    color: #999;
    font-size: 14px;
}

.rds-cpu-item-left {
    flex: 1;
    min-width: 0;
}

.rds-cpu-item-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 3px;
}

.rds-cpu-item-specs {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

.rds-cpu-item-bench {
    font-size: 11px;
    color: #aaa;
}

.rds-cpu-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-left: 20px;
}

.rds-cpu-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}

.rds-cpu-item-count {
    font-size: 11px;
    color: #aaa;
}

.rds-cpu-search {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.rds-cpu-search input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.rds-cpu-search input:focus {
    border-color: #2563eb;
}

.rds-avail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rds-avail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.rds-avail-row:hover {
    border-color: #2563eb;
    background: #f8faff;
}

.rds-avail-spec {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.rds-avail-extras {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.rds-avail-count {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.rds-avail-price {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
    margin-left: 4px;
}

.rds-avail-btn {
    padding: 4px 12px;
    border: 1px solid #2563eb;
    border-radius: 5px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.rds-avail-btn:hover {
    background: #1d4ed8;
}

.rds-avail-empty {
    width: 100%;
    padding: 12px 16px;
    color: #92400e;
    /* font-size: 14px; */
    /* font-weight: 600; */
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
}

.rds-config-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rds-config-block {
    margin-bottom: 0;
}

.rds-storages-row {
    display: flex;
    gap: 20px;
}

.rds-storages-row .rds-config-block {
    flex: 1;
}

.rds-config-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: #555;
}

.rds-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rds-btn {
    padding: 6px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s;
}

.rds-btn:hover {
    border-color: #aaa;
}

.rds-btn.rds-active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.rds-slot-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rds-slot-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rds-slot-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    min-width: 52px;
    text-align: left;
}

.rds-slot-select {
    padding: 5px 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    min-width: 140px;
}

.rds-slot-select:disabled {
    background: #f5f5f5;
    color: #999;
}

.rds-slot-base {
    border-color: #aaa;
    background: #f9f9f9;
}

.rds-ext-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rds-ext-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    /* font-size: 13px; */
}

.rds-ext-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.rds-ext-name {
    flex: 1;
}

.rds-ext-price {
    color: #666;
    white-space: nowrap;
}

.rds-price-breakdown {
    /* font-size: 13px; */
    margin-bottom: 12px;
}

.rds-price-line {
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #ddd;
}

.rds-price-line.rds-base {
    font-weight: 600;
}

.rds-price-line.rds-ext {
    color: #555;
    padding-left: 16px;
}

.rds-price-total {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    padding-top: 12px;
    border-top: 2px solid #2563eb;
}

.rds-payer-toggle {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.rds-payer-btn {
    flex: 1;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    background: #fff;
    border: none;
    transition: background 0.15s;
}

.rds-payer-btn.rds-active {
    background: #2563eb;
    color: #fff;
}

.rds-payer-btn:not(:last-child) {
    border-right: 1px solid #ddd;
}

.rds-avail-status-container {
    margin-top: 16px;
    max-width: 920px;
}

.rds-avail-status {
    padding: 12px 16px;
    border-radius: 6px;
    /* font-size: 14px; */
    /* line-height: 1.4; */
}

.rds-avail-ready {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.rds-price-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 10px 14px;
    border-radius: 6px;
    /* font-size: 13px; */
    margin-top: 10px;
}

.rds-avail-assembly {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

#rds-price-feedback {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    padding-top: 12px;
}

#rds-buy-container {
    margin-top: 20px;
}

.rds-contact-support {
    padding: 12px 16px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    /* font-size: 14px; */
}

.rds-price-feedback-inline {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    padding-top: 16px;
}

@media (max-width: 768px) {
    .rds-cpu-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .rds-cpu-item-right {
        margin-left: 0 !important;
        margin-top: 8px !important;
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .rds-cpu-trigger {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .rds-cpu-trigger-right {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .rds-avail-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .rds-avail-spec {
        white-space: normal !important;
    }

    .rds-avail-price {
        margin-left: 0 !important;
    }

    .rds-config-section {
        gap: 0 !important;
    }

    .rds-config-row,
    .rds-config-row .row {
        margin: 0 !important;
    }

    .rds-config-row .col-md-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .rds-config-row .col-md-8 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .rds-storages-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .rds-config-block {
        margin-top: 20px !important;
    }

    .rds-config-section > .rds-config-row > .col-md-4 > .rds-config-block {
        margin-top: 0 !important;
    }

    .rds-payment-section .row {
        margin: 0 !important;
    }

    .rds-payment-section .col-md-8,
    .rds-payment-section .col-md-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .rds-payment-block {
        margin-top: 20px !important;
    }

    .rds-payment-section .col-md-8 > .rds-payment-block {
        margin-top: 0 !important;
    }

    .rds-price-feedback-inline {
        padding-top: 14px !important;
        margin-top: 14px !important;
        border-top: 1px solid #eee !important;
    }

    .rds-btn-group {
        gap: 8px !important;
    }

    .rds-btn {
        padding: 8px 16px !important;
        font-size: 14px !important;
    }

    .rds-slot-list {
        gap: 8px !important;
    }

    .rds-slot-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    .rds-slot-label {
        min-width: auto !important;
    }

    .rds-slot-select {
        width: 100% !important;
        min-width: auto !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
    }

    .rds-price-feedback-inline {
        padding-top: 14px !important;
        margin-top: 14px !important;
        border-top: 1px solid #eee !important;
    }
}
