/**
 * Petruskevich Affiliates - Frontend Styles
 * Brand Colors: #7BC142 (green), #1A2332 (dark)
 */

.petr-affiliates-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1A2332;
}

.petr-affiliates-wrapper.rtl {
    direction: rtl;
    text-align: right;
}

.petr-affiliates-hero {
    text-align: center;
    margin-bottom: 40px;
}

.petr-affiliates-hero h2 {
    color: #1A2332;
    font-size: 2.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.petr-affiliates-hero p {
    font-size: 1.2em;
    color: #666;
    line-height: 1.6;
}

.petr-affiliates-features {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.petr-feature {
    background: #f8f9fa;
    border-left: 4px solid #7BC142;
    padding: 15px 20px;
    border-radius: 5px;
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rtl .petr-feature {
    border-left: none;
    border-right: 4px solid #7BC142;
}

.petr-feature-icon {
    color: #7BC142;
    font-size: 1.5em;
    font-weight: bold;
}

.petr-affiliates-how-it-works {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.petr-affiliates-how-it-works h3 {
    text-align: center;
    color: #1A2332;
    font-size: 2em;
    margin-bottom: 30px;
}

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

.petr-step {
    text-align: center;
}

.petr-step-number {
    width: 60px;
    height: 60px;
    background: #7BC142;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    margin: 0 auto 20px;
}

.petr-step h4 {
    color: #1A2332;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.petr-step p {
    color: #666;
    line-height: 1.6;
}

.petr-affiliates-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.petr-form-group {
    margin-bottom: 20px;
}

.petr-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1A2332;
    font-weight: 500;
}

.petr-form-group input[type="text"],
.petr-form-group input[type="email"],
.petr-form-group input[type="tel"],
.petr-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.petr-form-group input:focus {
    outline: none;
    border-color: #7BC142;
}

.petr-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.petr-button-primary {
    background: #7BC142;
    color: white;
    width: 100%;
}

.petr-button-primary:hover {
    background: #6aa838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(123, 193, 66, 0.3);
}

.petr-button-secondary {
    background: #1A2332;
    color: white;
}

.petr-button-secondary:hover {
    background: #2a3342;
}

.petr-button-green {
    background: #7BC142;
    color: white;
}

.petr-button-green:hover {
    background: #6aa838;
}

.petr-form-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.petr-form-message.error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: block;
}

.petr-form-message.success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
    display: block;
}

.petr-affiliates-notice {
    padding: 15px 20px;
    border-radius: 5px;
    margin: 20px 0;
    background: #e7f5ff;
    border-left: 4px solid #7BC142;
}

.rtl .petr-affiliates-notice {
    border-left: none;
    border-right: 4px solid #7BC142;
}

.petr-affiliates-notice.error {
    background: #fee;
    border-left-color: #c33;
}

.rtl .petr-affiliates-notice.error {
    border-right-color: #c33;
}

.petr-affiliates-footer {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 30px;
}

/* Dashboard Styles */

.petr-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.petr-dashboard-header h2 {
    color: #1A2332;
    margin: 0;
}

.petr-affiliate-link-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #7BC142;
}

.petr-affiliate-link-box label {
    display: block;
    color: #1A2332;
    font-weight: 600;
    margin-bottom: 10px;
}

.petr-link-copy-container {
    display: flex;
    gap: 10px;
}

.petr-link-copy-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    font-family: monospace;
}

.petr-copy-message {
    margin-top: 10px;
    color: #7BC142;
    font-weight: 600;
    display: none;
}

.petr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.petr-stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #7BC142;
}

.petr-stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #1A2332;
    margin-bottom: 10px;
}

.petr-stat-label {
    color: #666;
    font-size: 0.95em;
}

.petr-referrals-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.petr-referrals-section h3 {
    color: #1A2332;
    margin-bottom: 20px;
}

.petr-table-responsive {
    overflow-x: auto;
}

.petr-referrals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.petr-referrals-table th,
.petr-referrals-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.rtl .petr-referrals-table th,
.rtl .petr-referrals-table td {
    text-align: right;
}

.petr-referrals-table th {
    background: #f8f9fa;
    color: #1A2332;
    font-weight: 600;
}

.petr-referrals-table tbody tr:hover {
    background: #f8f9fa;
}

.petr-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

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

.petr-status-approved {
    background: #d1ecf1;
    color: #0c5460;
}

.petr-status-paid {
    background: #d4edda;
    color: #155724;
}

.petr-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.petr-no-data {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

/* Responsive */

@media (max-width: 768px) {
    .petr-affiliates-wrapper {
        padding: 20px 15px;
    }
    
    .petr-affiliates-hero h2 {
        font-size: 1.8em;
    }
    
    .petr-affiliates-form {
        padding: 25px 20px;
    }
    
    .petr-link-copy-container {
        flex-direction: column;
    }
    
    .petr-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .petr-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rtl .petr-dashboard-header {
        align-items: flex-end;
    }
}
