/**
 * CityHop Affiliate Dashboard Styles
 */

.cityhop-affiliate-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.affiliate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.affiliate-header h2 {
    margin: 0;
    font-size: 28px;
    color: #333;
}

.affiliate-code-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.affiliate-code-badge strong {
    font-size: 16px;
    margin-left: 5px;
}

/* Stats Grid */
.affiliate-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-icon {
    font-size: 36px;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-card.highlight .stat-value {
    color: white;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card.highlight .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Commission Breakdown */
.affiliate-commission-breakdown {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.affiliate-commission-breakdown h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

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

.commission-item {
    padding: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.commission-item.pending {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.commission-item.approved {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.commission-item.paid {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
}

.commission-label {
    font-weight: 600;
    color: #333;
}

.commission-amount {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* Link Generator */
.affiliate-link-generator {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.affiliate-link-generator h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.link-generator-form {
    max-width: 600px;
}

.affiliate-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.affiliate-select:focus {
    outline: none;
    border-color: #667eea;
}

.generated-link-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.generated-link-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.link-copy-wrapper {
    display: flex;
    gap: 8px;
}

.affiliate-link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    background: white;
}

.copy-link-btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-link-btn:hover {
    background: #5568d3;
}

.copy-link-btn.copied {
    background: #28a745;
}

.link-description {
    margin-top: 12px;
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
}

/* Recent Commissions */
.affiliate-recent-commissions {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.affiliate-recent-commissions h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.no-commissions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

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

.affiliate-commissions-table {
    width: 100%;
    border-collapse: collapse;
}

.affiliate-commissions-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.affiliate-commissions-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.affiliate-commissions-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-badge.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-paid {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* Partner Info */
.affiliate-info-box {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.affiliate-info-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Notice Box */
.cityhop-affiliate-notice {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 40px auto;
}

.cityhop-affiliate-notice.warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.cityhop-affiliate-notice p {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.cityhop-affiliate-notice .button {
    display: inline-block;
    padding: 12px 32px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.cityhop-affiliate-notice .button:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    .affiliate-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .affiliate-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .commission-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .link-copy-wrapper {
        flex-direction: column;
    }
    
    .copy-link-btn {
        width: 100%;
    }
}
