/* Yawend PCM Affiliate Styles */

.yawend-affiliate-dashboard {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.yawend-affiliate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.yawend-stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yawend-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.yawend-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.yawend-stat-label {
    color: #6c757d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yawend-affiliate-tools {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    margin: 30px 0;
    border: 1px solid #e9ecef;
}

.yawend-affiliate-tools h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.yawend-link-generator {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.yawend-form-group {
    margin-bottom: 15px;
}

.yawend-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.yawend-form-group input,
.yawend-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.yawend-form-group input:focus,
.yawend-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.yawend-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

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

.yawend-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.yawend-generated-link {
    background: #fff;
    border: 1px solid #28a745;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    display: none;
}

.yawend-generated-link.show {
    display: block;
}

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

.yawend-link-url {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.yawend-copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.yawend-copy-btn:hover {
    background: #218838;
}

.yawend-recent-commissions {
    margin-top: 30px;
}

.yawend-commissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.yawend-commissions-table th,
.yawend-commissions-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.yawend-commissions-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yawend-commissions-table tbody tr:hover {
    background: #f8f9fa;
}

.yawend-status {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yawend-status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.yawend-status-paid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.yawend-notice {
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
}

.yawend-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.yawend-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.yawend-loading {
    opacity: 0.6;
    pointer-events: none;
}

.yawend-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: yawend-spin 1s linear infinite;
}

@keyframes yawend-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .yawend-affiliate-stats {
        grid-template-columns: 1fr;
    }
    
    .yawend-link-generator {
        grid-template-columns: 1fr;
    }
    
    .yawend-link-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .yawend-commissions-table {
        font-size: 14px;
    }
    
    .yawend-commissions-table th,
    .yawend-commissions-table td {
        padding: 8px 10px;
    }
}

/* Animation for stat cards */
.yawend-stat-card {
    animation: yawend-fadeInUp 0.6s ease-out;
}

.yawend-stat-card:nth-child(1) { animation-delay: 0.1s; }
.yawend-stat-card:nth-child(2) { animation-delay: 0.2s; }
.yawend-stat-card:nth-child(3) { animation-delay: 0.3s; }
.yawend-stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes yawend-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for new commissions */
.yawend-new-commission {
    animation: yawend-pulse 2s ease-in-out;
}

@keyframes yawend-pulse {
    0%, 100% { background-color: transparent; }
    50% { background-color: #e8f5e8; }
}