/* Referral System Styles */

.rs-referral-section {
    margin-bottom: 0;
    position: relative;
}

.rs-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #725627;
    margin-bottom: 4px;
    margin-top: 0;
}

/* Referral Code Container */
.rs-referral-code-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rs-referral-code-box {
    flex: 1;
    min-width: 250px;
    padding: 10px 16px;
    background: #F9F4EC;
    border: 2px dashed #CBA567;
    border-radius: 100px;
}

.rs-referral-code {
    font-size: 16px;
    font-weight: 600;
    color: #CBA567;
    letter-spacing: 1px;
    display: block;
}

/* Button Group */
.rs-button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: 500;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.rs-btn-copy {
    background: #ffffff;
    color: #AB8E21;
    border: 1px solid #AB8E21;
}

.rs-btn-copy:hover {
    background: #FBF7EA;
   
}

.rs-btn-copy:active {
    transform: translateY(0);
}

.rs-btn-share {
    background: #AB8E21;
    color: #FDFCF6;
}

.rs-btn-share:hover {
    background: #96791c;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(171, 142, 33, 0.3);
}

.rs-btn-share:active {
    transform: translateY(0);
}

.rs-btn-generate {
    background: #AB8E21;
    color: #FDFCF6;
}

.rs-btn-generate:hover {
    background: #96791c;
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(171, 142, 33, 0.3);
}

.rs-btn-generate:active {
    transform: translateY(0);
}

/* Success Message */
.rs-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.rs-success-message svg {
    flex-shrink: 0;
}

/* Credit Balance Section */
.rs-credit-balance-section {
    background: #D6B129;
    border-radius: 16px;
    padding:4px;
    margin-top: 24px;
    margin-bottom: 0;
}

.rs-credit-balance-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    margin-top: 4px;
    justify-content: center;
}

.rs-credit-balance-header span {
    font-size: 16px;
    font-weight: 600;
    color: #FCFBF7;
}

.rs-credit-balance-content {
    background-image: url('https://www.estjan.com/wp-content/uploads/2025/11/bg-credit-amount-scaled.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.rs-credit-amount {
    font-size: 36px;
    font-weight: 700;
    color: #D6B129;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.36px;
}

.rs-credit-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rs-credit-info svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.rs-credit-info span {
    font-size: 14px;
    color: #AB8E21;
    line-height: 1.5;
    font-weight: 500;
}

/* History Table Section */
.rs-history-section {
    margin-top: 40px;
    background: #FCFBF7;
    padding: 24px;
    border-radius: 24px;
    margin-bottom: 80px;
}

.rs-history-title {
    font-size: 18px;
    font-weight: 600;
    color: #725627;
    margin: 0 0 24px 0;
}

.rs-table-wrapper {
    background: #FCFBF7;
    border-radius: 12px;
    overflow: hidden;
}

.rs-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #FCFBF7;
}

.rs-history-table thead tr {
    background: #F9F4EC;
}

.rs-history-table th {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    line-height: 16px;
    color: #725627;
    border-bottom: 1px solid #E5E5E5;
    border-left: 1px solid #E5E5E5;
    border-right: 1px solid #E5E5E5;
    min-width: 100px;
}

.rs-history-table th:first-child {
    border-left: none;
}

.rs-history-table th:last-child {
    border-right: none;
}

.rs-history-table tbody tr {
    background: #FCFBF7;
}

.rs-history-table td {
    padding: 8px;
    font-size: 16px;
    line-height: 26px;
    color: #725627;
    text-align: center;
    border: 1px solid #E5E5E5;
}

.rs-history-table td.rs-amount {
    font-weight: 600;
    color: #725627;
}

.rs-status-badge {
    display: inline-block;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid;
    padding: 2px 8px;
    line-height: 20px;
}

.rs-status-badge.rs-status-completed {
    background: #F7FFFA;
    color: #34C37B;
    border-color: #34C37B;
}

.rs-status-badge.rs-status-pending {
    background: #FFF9ED;
    color: #F59E0B;
    border-color: #F59E0B;
}

.rs-history-empty {
    margin-top: 40px;
    padding: 62px 40px;
    text-align: center;
    background: #FCFBF7;
    border-radius: 12px;
    border: 1px solid #E5E5E5;
}

.rs-history-empty p {
    color: #725627;
    margin: 0;
    font-size: 15px;
    opacity: 0.7;
}

.rs-history-error {
    margin-top: 40px;
    padding: 62px 40px;
    text-align: center;
    background: #FFF5F5;
    border-radius: 12px;
    border: 1px solid #FCA5A5;
}

.rs-history-error p {
    color: #DC2626;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
}

/* Main Container */
.rs-main-container {
    background: #FCFBF7;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}

/* Accordion Section */
.rs-accordion-section {
    margin-top: 24px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    overflow: hidden;
    background: #FCFBF7;
}

.rs-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: transparent;
    border: none;
    border-bottom: none !important;
    cursor: pointer;
    text-align: left;
    outline: none;
    box-shadow: none;
}

.rs-accordion-header:focus,
.rs-accordion-header:active,
.rs-accordion-header:hover {
    outline: none;
    border-bottom: none !important;
    box-shadow: none;
    background: transparent;
}

.rs-accordion-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 26px;
    color: #725627;
    margin: 0;
    font-family: 'Nunito', sans-serif;
}

.rs-accordion-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.rs-accordion-section.rs-accordion-open .rs-accordion-icon {
    transform: rotate(0deg);
}

.rs-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
    font-family: 'Nunito', sans-serif;
}

.rs-accordion-section > p:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.rs-accordion-section.rs-accordion-open .rs-accordion-content {
    max-height: 1000px;
    padding: 0px 16px 16px 16px;
}

.rs-accordion-item {
    padding: 12px 0;
    font-size: 16px;
    line-height: 26px;
    font-weight: 400;
    color: #725627;
    font-family: 'Nunito', sans-serif;
}

/* Pagination Styles */
.rs-result-count-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.rs-result-count {
    font-size: 14px;
    font-family: Nunito;
    color: #7F7F7F;
    margin: 0;
    outline: none;
}

.rs-pagination {
    display: flex;
    justify-content: flex-end;
}

.rs-pagination .page-numbers {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
    align-items: center;
}

.rs-pagination .page-numbers li {
    margin: 0;
}

.rs-pagination .page-numbers a,
.rs-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    font-size: 14px;
    color: #725627;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: white;
}

.rs-pagination .page-numbers a:hover {
    background: #F9F4EC;
    color: #725627;
}

.rs-pagination .page-numbers .current {
    background: #D6B129;
    color: white;
}

.rs-pagination .page-numbers .prev,
.rs-pagination .page-numbers .next {
    background: white;
    border: 0.5px solid #E5E5E5;
}


.rs-pagination .page-numbers .prev:hover,
.rs-pagination .page-numbers .next:hover {
    background: #F9F4EC;
    border-color: #AB8E21;
}

.rs-pagination .page-numbers .prev svg,
.rs-pagination .page-numbers .next svg {
    display: block;
}

.rs-pagination .page-numbers .dots {
    color: #725627;
    opacity: 0.5;
}

.rs-table-wrapper {
    overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .rs-accordion-header {
        padding: 12px;
    }
    .rs-accordion-section.rs-accordion-open .rs-accordion-content {
        padding: 0px 12px 12px 12px;
    }
    .rs-referral-code , .rs-btn, .rs-credit-balance-header span, .rs-accordion-title{
    font-size: 14px;
    }
    .rs-accordion-item {
        font-size: 12px;
        line-height: 18px;
    }
    .rs-referral-code-box {
        text-align: center;
    }
    .rs-referral-code-container {
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .rs-button-group {
        width: 100%;
    }
    
    .rs-btn {
        flex: 1;
        justify-content: center;
        padding: 6px 12px;
    }
    .rs-main-container {
        padding: 12px;
    }
    .rs-button-group {
        flex-direction: row;
    }
    
    .rs-btn {
        width: 48%;
    }
    
    .rs-credit-balance-section {
        padding: 8px 4px 4px 4px;
    }
    
    .rs-credit-balance-content {
        padding: 16px 12px;
    }
    
    .rs-credit-amount {
        font-size: 28px;
    }
    
    .rs-history-section {
        padding: 12px;
    }
    
    .rs-history-title {
        font-size: 18px;
    }
    
    .rs-history-table th,
    .rs-history-table td {
        padding: 8px;
    }
    .rs-history-table th {
        font-family: 14px;
        line-height: 14px;
    }
    .rs-history-table td {
        font-size: 12px;
        line-height: 18px;
    }
    .rs-status-badge {
        padding: 2px 12px;
        font-size: 12px;
    }
    .rs-table-wrapper {
        overflow-x: auto;
    }
    .rs-result-count-container {
        justify-content: center;

    }
    .rs-result-count {
        font-size: 12px;
        order: 2;
    }

    
    .rs-pagination {
        justify-content: center;
        width: 100%;
    }
    
    .rs-pagination .page-numbers a,
    .rs-pagination .page-numbers span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    div[style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column;
        align-items: stretch !important;
    }
}

