/* Affiliate Page Styles */

/* Page layout */
body {
    padding-bottom: 80px; /* Space for bottom nav */
}

.affiliate-intro {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.1) 0%, rgba(139, 115, 85, 0.05) 100%);
    border-radius: 20px;
    margin: 20px;
}

.affiliate-headline {
    font-family: "Jaro", sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #C9A876;
    margin-bottom: 20px;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

.affiliate-description {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.affiliate-description p {
    margin-bottom: 15px;
}

.video-trigger-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #C9A876 0%, #8B7355 100%);
    color: #000;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(201, 168, 118, 0.3);
}

.video-trigger-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(201, 168, 118, 0.2);
}

/* Affiliate Tiers Slider */
.affiliate-tiers-section {
    padding: 30px 20px;
    margin: 20px 0;
}

.section-title {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.tiers-slider-container {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.tier-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s ease;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.15) 0%, rgba(139, 115, 85, 0.1) 100%);
    border: 2px solid #8B7355;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
}

.tier-slide.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
}

.tier-badge {
    font-family: "Jaro", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #C9A876;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.tier-commission {
    font-family: "Inter", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #00C853;
    margin-bottom: 10px;
}

.tier-requirement {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #EDE8BE;
    margin-bottom: 15px;
    opacity: 0.9;
}

.tier-description {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: #EDE8BE;
    line-height: 1.6;
    opacity: 0.8;
}

.slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.slider-btn {
    background: rgba(201, 168, 118, 0.2);
    border: 2px solid #8B7355;
    color: #C9A876;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:active {
    transform: scale(0.95);
    background: rgba(201, 168, 118, 0.3);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(201, 168, 118, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #C9A876;
    width: 12px;
    height: 12px;
}

/* Portal Button */
.portal-button-section {
    padding: 20px;
    text-align: center;
}

.affiliate-portal-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #00C853 0%, #00A544 100%);
    color: #fff;
    border: none;
    padding: 18px 40px;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
    letter-spacing: 0.5px;
}

.affiliate-portal-btn:active {
    transform: scale(0.98);
    box-shadow: 0 3px 15px rgba(0, 200, 83, 0.3);
}

/* FAQ Section */
.faq-section {
    padding: 30px 20px;
    margin: 20px 0;
}

.faq-item {
    margin-bottom: 15px;
    border: 2px solid #8B7355;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(201, 168, 118, 0.05);
}

.faq-question {
    font-family: "Inter", sans-serif;
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: none;
    color: #C9A876;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-icon {
    font-size: 24px;
    font-weight: 700;
    color: #C9A876;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 20px 20px 20px;
}

.faq-answer p {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.faq-answer ul {
    margin: 10px 0 10px 20px;
}

.faq-answer li {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 5px;
}

/* Portal Modal */
.affiliate-portal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 10px;
}

.affiliate-portal-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-modal-content {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid #8B7355;
    border-radius: 20px;
    padding: 20px 15px 15px 15px;
    max-width: 500px;
    width: 85%;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

.portal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #C9A876;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Terms Section */
.portal-terms {
    text-align: center;
}

.portal-terms h3 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.terms-content {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(201, 168, 118, 0.05);
    border-radius: 10px;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 13px;
    text-align: left;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 3px solid #C9A876;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
    background: #1a1a1a;
    position: relative;
    outline: none;
}

.checkbox-label input[type="checkbox"]:checked {
    background: #C9A876;
    border-color: #C9A876;
}

.checkbox-label input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-custom {
    display: none;
}

.checkbox-text {
    flex: 1;
    line-height: 1.4;
}

.confirm-terms-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #C9A876 0%, #8B7355 100%);
    color: #000;
    border: none;
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    width: 100%;
}

.confirm-terms-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Portal Dashboard */
.portal-dashboard {
    display: none;
}

.profile-section {
    text-align: center;
    margin-bottom: 30px;
}

.profile-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.affiliate-code-box {
    margin-top: 15px;
}

.affiliate-code-box label {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.code-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.code-display input {
    flex: 1;
    font-family: "Inter", sans-serif;
    background: rgba(201, 168, 118, 0.1);
    border: 2px solid #8B7355;
    border-radius: 10px;
    padding: 12px 15px;
    color: #EDE8BE;
    font-size: 13px;
}

.copy-btn {
    font-family: "Inter", sans-serif;
    background: #C9A876;
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

/* Tier Progress */
.tier-progress-section {
    margin: 25px 0;
}

.tier-progress-section h4 {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.tier-progress-section h4 span {
    color: #C9A876;
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(201, 168, 118, 0.1);
    border: 2px solid #8B7355;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00C853 0%, #00A544 100%);
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 12px;
    text-align: center;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0;
}

.stat-box {
    background: rgba(201, 168, 118, 0.08);
    border: 2px solid #8B7355;
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
}

.projected-earnings-box {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.15) 0%, rgba(0, 165, 68, 0.1) 100%);
    border-color: #00C853;
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.2);
}

.stat-label {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.stat-value {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 28px;
    font-weight: 700;
}

.projected-value {
    color: #00C853;
    font-size: 36px;
}

/* Downline Section */
.downline-section {
    margin-top: 30px;
}

.downline-section h4 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .affiliate-headline {
        font-size: 24px;
    }
    
    .tier-commission {
        font-size: 28px;
    }
    
    .downline-table th,
    .downline-table td {
        font-size: 11px;
        padding: 10px 8px;
    }
}

/* ==================== AFFILIATE PORTAL PAGE STYLES ==================== */

/* Terms Agreement Section */
.terms-agreement-section {
    padding: 20px;
    margin: 20px;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.1) 0%, rgba(139, 115, 85, 0.05) 100%);
    border-radius: 15px;
    border: 2px solid #8B7355;
}

.terms-box {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 14px;
    line-height: 1.8;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    margin: 20px 0;
}

.terms-checkbox-container {
    margin: 25px 0;
    padding: 0 10px;
}

.terms-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 14px;
}

.terms-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    cursor: pointer;
    accent-color: #C9A876;
}

.agree-terms-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #C9A876 0%, #8B7355 100%);
    color: #000;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.agree-terms-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agree-terms-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Portal Profile Section */
.portal-profile-section {
    padding: 20px;
    margin: 20px;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.1) 0%, rgba(139, 115, 85, 0.05) 100%);
    border-radius: 15px;
    text-align: center;
}

.profile-icon-large {
    font-size: 60px;
    margin-bottom: 20px;
}

.affiliate-link-box {
    margin-top: 20px;
}

.affiliate-link-box label {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.link-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-display input {
    flex: 1;
    font-family: "Inter", sans-serif;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #8B7355;
    color: #EDE8BE;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 13px;
}

.copy-link-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #C9A876 0%, #8B7355 100%);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.copy-link-btn:active {
    transform: scale(0.95);
}

/* Tier Progress Section (Portal Page) */
.tier-progress-section {
    padding: 20px;
    margin: 20px;
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.1) 0%, rgba(139, 115, 85, 0.05) 100%);
    border-radius: 15px;
}

.tier-progress-section h3 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
}

.tier-progress-bar {
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
}

.tier-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A876 0%, #8B7355 100%);
    transition: width 0.5s ease;
}

.tier-progress-text {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 13px;
    margin-top: 10px;
}

/* Portal Stats Section */
.portal-stats-section {
    padding: 0 20px;
    margin: 20px 0;
}

.portal-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.portal-stat-box {
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.1) 0%, rgba(139, 115, 85, 0.05) 100%);
    border: 2px solid #8B7355;
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
}

.portal-stat-box.projected-box {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2) 0%, rgba(0, 165, 68, 0.1) 100%);
    border-color: #00C853;
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.3);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stat-label {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-family: "Jaro", sans-serif;
    color: #EDE8BE;
    font-size: 32px;
    font-weight: 700;
}

.projected-value {
    color: #00C853;
    font-size: 40px;
}

/* Withdrawal Section */
.withdrawal-section {
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.withdrawal-btn {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #00C853 0%, #00A544 100%);
    color: #000;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 200, 83, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.withdrawal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 200, 83, 0.5);
}

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

.withdrawal-btn .btn-icon {
    font-size: 20px;
}

.withdrawal-btn .btn-text {
    font-size: 16px;
}

/* Downline List Section */
.downline-list-section {
    padding: 20px;
    margin: 20px;
}

.downline-list-section h3 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* Earning History Section */
.earning-history-section {
    padding: 20px;
    margin: 20px;
}

.earning-history-section h3 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.earning-history-container {
    background: rgba(20, 20, 20, 0.4);
    border: 2px solid #8B7355;
    border-radius: 15px;
    overflow: hidden;
}

.earning-history-table {
    width: 100%;
    border-collapse: collapse;
}

.earning-history-table thead {
    background: linear-gradient(135deg, rgba(201, 168, 118, 0.2) 0%, rgba(139, 115, 85, 0.1) 100%);
}

.earning-history-table th {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid #8B7355;
}

.earning-history-table td {
    font-family: "Inter", sans-serif;
    color: #EDE8BE;
    font-size: 13px;
    padding: 15px 10px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.3);
}

.earning-history-table tbody tr:last-child td {
    border-bottom: none;
}

.earning-history-table .status-paid {
    color: #00C853;
    font-weight: 600;
}

.earning-history-table .status-pending {
    color: #FFC107;
    font-weight: 600;
}

.earning-history-table .status-processing {
    color: #2196F3;
    font-weight: 600;
}

/* Awaiting Approval Section */
.awaiting-approval-section {
    padding: 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
    border-radius: 15px;
}

.awaiting-approval-section h3 {
    font-family: "Inter", sans-serif;
    color: #FFC107;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.awaiting-approval-section h3::before {
    content: "⏳";
    font-size: 20px;
}

.awaiting-table-container {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 10px;
}

.awaiting-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Inter", sans-serif;
}

.awaiting-table th {
    background: rgba(255, 193, 7, 0.15);
    color: #FFC107;
    font-size: 12px;
    font-weight: 700;
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 193, 7, 0.3);
}

.awaiting-table td {
    color: #EDE8BE;
    font-size: 13px;
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.1);
}

.awaiting-table .no-data {
    text-align: center;
    color: #FFC107;
    padding: 30px;
    font-style: italic;
}

.downline-list-section {
    padding: 20px;
    margin: 20px 0;
}

.downline-list-section h3 {
    font-family: "Inter", sans-serif;
    color: #C9A876;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}
.downline-table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #8B7355;
}

.downline-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Inter", sans-serif;
}

.downline-table th {
    background: rgba(201, 168, 118, 0.1);
    color: #C9A876;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #8B7355;
    white-space: nowrap;
}

.downline-table td {
    color: #EDE8BE;
    font-size: 13px;
    padding: 15px;
    border-bottom: 1px solid rgba(139, 115, 85, 0.3);
    word-break: break-word;
}

.downline-table tbody tr:last-child td {
    border-bottom: none;
}

.downline-table .no-data {
    text-align: center;
    color: #8B7355;
    padding: 30px;
    font-style: italic;
}
