/* ============================================================================
   LREB MARKETPLACE FORMS — CSS (v3.0)
   ============================================================================ */

.lreb-marketplace-selector-block,
.lreb-dynamic-form-container,
.lreb-marketplace-form {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============ MARKETPLACE SELECTOR BLOCK ============ */
.lreb-marketplace-selector-block {
    margin: 24px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}
.lreb-marketplace-selector-block .block-title-wrap {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #E53935;
}
.lreb-marketplace-selector-block h2 {
    font-size: 20px;
    font-weight: 700;
    color: #212121;
    margin: 0;
    display: flex;
    align-items: center;
}
.lreb-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #E53935;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    margin-right: 10px;
}
.lreb-required { color: #E53935; }

/* ============ DROPDOWN FIX ============ */
.lreb-mp-select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    height: auto !important;
    min-height: 48px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    cursor: pointer !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
}
.lreb-mp-select option {
    padding: 10px !important;
    font-size: 14px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.4 !important;
}

/* ============ DYNAMIC FORM CONTAINER ============ */
.lreb-dynamic-form-container {
    margin: 24px 0;
    min-height: 200px;
}
.lreb-form-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
}
.lreb-form-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}
.lreb-form-loading .spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E53935;
    border-radius: 50%;
    animation: lreb-spin 1s linear infinite;
    margin-bottom: 12px;
}
@keyframes lreb-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============ MARKETPLACE FORM HEADER ============ */
.lreb-mp-form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}
.lreb-mp-form-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.lreb-mp-form-icon i {
    font-size: 24px;
}
.lreb-mp-form-title-wrap {
    flex: 1;
}
.lreb-mp-form-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #212121;
}
.lreb-mp-form-desc {
    font-size: 13px;
    color: #555;
    margin: 0;
}

/* ============ FORM BODY ============ */
.lreb-mp-form-body {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 24px;
}
.lreb-form-section {
    margin-bottom: 24px;
}
.lreb-section-heading {
    font-size: 16px;
    font-weight: 700;
    color: #212121;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ============ PRICING RADIOS ============ */
.lreb-pricing-radios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}
.lreb-time-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.lreb-price-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    position: relative;
}
.lreb-price-option:hover {
    border-color: #E53935;
    background: #fafafa;
}
.lreb-price-option input[type="radio"] {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
}
.lreb-price-option input[type="radio"]:checked + .lreb-price-label {
    color: #E53935;
    font-weight: 700;
}
.lreb-price-option:has(input:checked) {
    border-color: #E53935;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}
.lreb-price-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding-right: 20px;
}
.lreb-price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #E53935;
}
.lreb-price-discount {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
}

/* ============ TOTAL CALCULATOR ============ */
.lreb-total-calculator {
    background: #212121;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
.lreb-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #333;
}
.lreb-total-row:last-child {
    border-bottom: none;
}
.lreb-total-grand {
    font-size: 20px;
    font-weight: 700;
    color: #FFC107;
    border-top: 2px solid #FFC107;
    padding-top: 12px;
    margin-top: 8px;
}
.lreb-total-label { font-weight: 600; }
.lreb-total-value { font-weight: 700; }

/* ============ INFO BOX ============ */
.lreb-info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.lreb-info-box p {
    margin: 4px 0;
    font-size: 13px;
}
.lreb-info-box ul {
    margin: 8px 0;
    padding-left: 20px;
}
.lreb-info-box li {
    font-size: 13px;
    margin: 4px 0;
}

/* ============ WARNING BOX ============ */
.lreb-warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.lreb-warning-box p {
    margin: 8px 0 0 0;
    font-size: 13px;
}

/* ============ COMMISSION TABLE ============ */
.lreb-commission-table {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 6px;
}
.lreb-commission-table h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #212121;
}
.lreb-commission-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.lreb-commission-row:last-child {
    border-bottom: none;
}
.lreb-commission-row strong {
    color: #E53935;
}

/* ============ COMMISSION PREVIEW ============ */
.lreb-commission-preview {
    background: #fff3cd;
    padding: 16px;
    border-radius: 6px;
    margin-top: 12px;
    border: 1px solid #ffeaa7;
}
.lreb-commission-preview p {
    margin: 4px 0;
    font-size: 14px;
}

/* ============ FORM GROUPS ============ */
.lreb-form-group {
    margin-bottom: 16px;
}
.lreb-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
}
.lreb-form-group input,
.lreb-form-group select,
.lreb-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.lreb-form-group small {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

/* ============ BONUS BOX ============ */
.lreb-bonus-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
    font-size: 13px;
}

/* ============ NOTE ============ */
.lreb-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

/* ============ AGREE CHECKBOX ============ */
.lreb-agree-checkbox-wrap {
    background: #f9f9f9;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #E53935;
    margin-top: 20px;
}
.lreb-agree-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
}
.lreb-agree-checkbox input {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

/* ============ CHECKBOX GRID ============ */
.lreb-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.lreb-checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.lreb-checkbox-option input {
    width: auto;
    margin: 0;
}

/* ============ PROMO CODE BOX ============ */
.lreb-promo-code-box {
    background: #fff3cd;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    margin-top: 16px;
}
.lreb-promo-code-box p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

/* ============ REQUIREMENTS LIST ============ */
.lreb-requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lreb-requirements-list li {
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}
.lreb-requirements-list li:last-child {
    border-bottom: none;
}

/* ============ RENTAL / AD SECTIONS (toggle) ============ */
.lreb-rental-section,
.lreb-news-section,
.lreb-ad-section {
    margin-top: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .lreb-marketplace-selector-block,
    .lreb-mp-form-body {
        padding: 16px;
    }
    .lreb-mp-form-header {
        padding: 16px;
    }
    .lreb-mp-form-title {
        font-size: 16px;
    }
    .lreb-pricing-radios {
        grid-template-columns: 1fr;
    }
    .lreb-price-amount {
        font-size: 16px;
    }
    .lreb-total-grand {
        font-size: 16px;
    }
}
