/* Public Styles */
.referral-link-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.referral-link-container h4 {
    margin-top: 0;
    color: #495057;
}

.referral-link-box {
    display: flex;
    margin: 15px 0;
}

.referral-link-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px 0 0 4px;
    font-family: monospace;
    background: white;
}

.referral-copy-btn {
    padding: 10px 15px;
    background: #007cba;
    color: white;
    border: 1px solid #007cba;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.referral-copy-btn:hover {
    background: #005a87;
}

.referral-link-help {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 0;
}

/* Referral Stats */
.referral-stats-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.referral-stats-container h4 {
    margin-top: 0;
    color: #495057;
}

.referral-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.referral-stat {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.referral-stat.pending {
    border-left: 4px solid #ffc107;
}

.referral-stat.available {
    border-left: 4px solid #28a745;
}

.referral-stat.used {
    border-left: 4px solid #6c757d;
}

.stat-icon {
    font-size: 24px;
    margin-right: 15px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* WooCommerce My Account Referral Sections */
.rp-dashboard,
.rp-commissions,
.rp-network {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rp-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rp-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 18px;
}

.rp-referrer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.referrer-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.referrer-email {
    color: #666;
    font-size: 14px;
}

.rp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.rp-stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #007cba;
}

.rp-stat-card.pending {
    border-left-color: #ffc107;
}

.rp-stat-card.reserved {
    border-left-color: #fd7e14;
}

.rp-stat-card.available {
    border-left-color: #28a745;
}

.rp-stat-card.used {
    border-left-color: #6c757d;
}

.rp-referral-link-box {
    display: flex;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rp-referral-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-family: monospace;
    font-size: 14px;
    background: white;
    outline: none;
}

.rp-copy-btn {
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 500;
}

.rp-copy-btn:hover {
    background: #005a87;
}

.rp-help-text {
    font-size: 14px;
    color: #666;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

.rp-no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.rp-commissions-table,
.rp-network-list {
    margin-top: 20px;
}

.rp-commissions-table table,
.rp-network-list table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rp-commissions-table th,
.rp-commissions-table td,
.rp-network-list th,
.rp-network-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.rp-commissions-table th,
.rp-network-list th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.rp-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.rp-status-pending {
    background: #fff3cd;
    color: #856404;
}

.rp-status-available {
    background: #d4edda;
    color: #155724;
}

.rp-status-used {
    background: #d1ecf1;
    color: #0c5460;
}

.rp-status-reserved {
    background: #f8d7da;
    color: #721c24;
}

.rp-network-stats {
    margin-bottom: 30px;
}

/* Checkout commission field */
#commission_usage_field {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

#commission_usage_field h4 {
    margin-top: 0;
    color: #495057;
}

#commission_usage_field label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

#commission_usage_field input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive design */
@media (max-width: 768px) {

    .referral-stats-grid,
    .rp-stats-grid {
        grid-template-columns: 1fr;
    }

    .referral-link-box,
    .rp-referral-link-box {
        flex-direction: column;
    }

    .referral-link-input,
    .rp-referral-input {
        border-radius: 4px;
        margin-bottom: 10px;
    }

    .referral-copy-btn,
    .rp-copy-btn {
        border-radius: 4px;
    }

    .rp-commissions-table table,
    .rp-network-list table {
        font-size: 14px;
    }

    .rp-commissions-table th,
    .rp-commissions-table td,
    .rp-network-list th,
    .rp-network-list td {
        padding: 8px 10px;
    }
}