/**
 * Styles dla panelu partnerskiego
 */

/* Reset i podstawowe style */
.aa-container * {
    box-sizing: border-box;
}

.aa-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Nagłówek */
.aa-header {
    margin-bottom: 30px;
}

.aa-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
}

.aa-description {
    color: #666;
    margin: 0;
}

/* Komunikaty */
.aa-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.aa-success {
    background-color: #e7f9ec;
    border: 1px solid #c3e9d0;
    color: #1e8a3f;
}

.aa-error {
    background-color: #f9e7e7;
    border: 1px solid #e9c3c3;
    color: #8a1e1e;
}

.aa-warning {
    background-color: #f9f2e7;
    border: 1px solid #e9dbc3;
    color: #8a5c1e;
}

.aa-info {
    background-color: #e7ecf9;
    border: 1px solid #c3cde9;
    color: #1e3f8a;
}

/* Karty */
.aa-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.aa-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    background-color: #f9f9f9;
}

.aa-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.aa-card-body {
    padding: 20px;
}

/* Statystyki */
.aa-stats-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.aa-stat-box {
    flex: 1;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-radius: 4px;
    margin: 0 10px 20px;
    padding: 15px 20px;
}

.aa-stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.aa-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

/* Zakładki */
.aa-tabs {
    margin-bottom: 30px;
}

.aa-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e5e5e5;
}

.aa-tabs-nav li {
    margin: 0;
    padding: 0;
}

.aa-tabs-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    border-radius: 4px 4px 0 0;
}

.aa-tabs-nav a:hover {
    color: #333;
    background-color: #f9f9f9;
}

.aa-tabs-nav a.active {
    background-color: #fff;
    border-color: #e5e5e5;
    color: #333;
    font-weight: 600;
}

.aa-tab-content {
    display: none;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.aa-tab-content.active {
    display: block;
}

/* Formularz */
.aa-form-field {
    margin-bottom: 15px;
}

.aa-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.aa-form-field input[type="text"],
.aa-form-field input[type="number"],
.aa-form-field input[type="email"],
.aa-form-field input[type="password"],
.aa-form-field textarea,
.aa-form-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.aa-form-field input[type="checkbox"] {
    margin-right: 5px;
}

.aa-form-field .description {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.aa-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aa-button:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

.aa-button-primary {
    background-color: #0073aa;
    border-color: #006799;
    color: #fff;
}

.aa-button-primary:hover {
    background-color: #006799;
    color: #fff;
}

/* Link afiliacyjny */
.aa-affiliate-link {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.aa-affiliate-link-url {
    font-family: monospace;
    word-break: break-all;
    padding-right: 40px;
}

.aa-copy-link {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 0;
}

.aa-copy-link:hover {
    color: #006799;
}

.aa-copy-link svg {
    width: 18px;
    height: 18px;
}

/* Kod HTML */
.aa-html-code {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    font-family: monospace;
    white-space: pre-wrap;
}

.aa-copy-html {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 0;
}

.aa-copy-html:hover {
    color: #006799;
}

.aa-copy-html svg {
    width: 18px;
    height: 18px;
}

/* Banery */
.aa-banners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.aa-banner-item {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.aa-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.aa-banner-info {
    padding: 10px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aa-banner-size {
    font-size: 12px;
    color: #666;
}

.aa-banner-copy {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 5px;
}

.aa-banner-copy:hover {
    color: #006799;
}

.aa-banner-copy svg {
    width: 16px;
    height: 16px;
}

/* Kody rabatowe */
.aa-discount-codes-list {
    margin-top: 20px;
}

.aa-discount-code {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.aa-discount-code-info {
    display: flex;
    align-items: center;
}

.aa-discount-code-text {
    font-family: monospace;
    font-weight: 600;
    margin-right: 15px;
}

.aa-discount-value {
    background-color: #0073aa;
    color: #fff;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
}

.aa-copy-discount {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    padding: 5px;
}

.aa-copy-discount:hover {
    color: #006799;
}

.aa-copy-discount svg {
    width: 16px;
    height: 16px;
}

/* Tabela prowizji */
.aa-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.aa-table th {
    background-color: #f9f9f9;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.aa-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.aa-table tr:hover td {
    background-color: #f5f5f5;
}

.aa-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.aa-status-pending {
    background-color: #f2f9e7;
    color: #5c8a1e;
}

.aa-status-approved {
    background-color: #e7f9ec;
    color: #1e8a3f;
}

.aa-status-rejected {
    background-color: #f9e7e7;
    color: #8a1e1e;
}

.aa-status-paid {
    background-color: #e7ecf9;
    color: #1e3f8a;
}

/* Responsywność */
@media (max-width: 768px) {
    .aa-stats-grid {
        flex-direction: column;
    }
    
    .aa-stat-box {
        margin-bottom: 10px;
    }
    
    .aa-tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .aa-banners-grid {
        grid-template-columns: 1fr;
    }
    
    .aa-table {
        display: block;
        overflow-x: auto;
    }
}


/* Style dla szablonu panelu partnera */
body.affiliate-dashboard-template {
    margin: 0;
    padding: 0;
    background-color: var(--pp-gray-100, #f1f5f9);
}

.affiliate-dashboard-template .affiliate-dashboard-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.affiliate-dashboard-template .pp-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Ukryj niepotrzebne elementy motywu */
.affiliate-dashboard-template header.site-header,
.affiliate-dashboard-template footer.site-footer,
.affiliate-dashboard-template .site-content > .container,
.affiliate-dashboard-template #page > .wrap,
.affiliate-dashboard-template .entry-header,
.affiliate-dashboard-template .entry-footer,
.affiliate-dashboard-template .post-navigation,
.affiliate-dashboard-template .comments-area {
    display: none !important;
}

/* Usuń standardowe marginesy i paddingi */
.affiliate-dashboard-template .site-content,
.affiliate-dashboard-template .content-area,
.affiliate-dashboard-template .site-main,
.affiliate-dashboard-template article.page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}



