/**
 * ClassiPress Trust Core 2026 PRO - Stylesheet
 * Wersja: 20.0.0
 * Kompatybilność: ClassiPress 4.x + WordPress 6.x
 */

/* === ZMIENNE === */
:root {
    --cptc-primary: #00a651;
    --cptc-primary-soft: #f0fdf4;
    --cptc-white: #ffffff;
    --cptc-gray-100: #f8fafc;
    --cptc-gray-200: #e2e8f0;
    --cptc-gray-600: #64748b;
    --cptc-gray-800: #1e293b;
    --cptc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --cptc-radius: 12px;
}

/* === RESET KONFLIKTÓW === */
.author-verified-badge, 
.verified-badge,
.listing-owner-name svg {
    display: none !important;
}

/* === SYSTEM AWATARA === */
.listing-owner-avatar, 
.author-avatar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
}

.cptc-v-wrapper {
    position: relative !important;
    display: inline-flex !important;
    line-height: 0;
    transition: all 0.25s ease;
}

.cptc-v-wrapper:hover {
    transform: translateY(-2px);
}

/* Odznaka Tarczy */
.cptc-v-shield {
    position: absolute !important;
    bottom: 2% !important;
    right: 2% !important;
    width: 28% !important;
    height: 28% !important;
    min-width: 24px;
    min-height: 24px;
    background-color: var(--cptc-primary) !important;
    border: 2.5px solid var(--cptc-white) !important;
    border-radius: 50% !important;
    box-shadow: var(--cptc-shadow) !important;
    z-index: 10 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M256 0c4.6 0 9.2 1 13.4 2.9L457.7 82.8c22.9 9.8 37.5 32.4 37.5 57.4v73.3c0 92.9-54.8 179.5-140.4 221.7L269.7 492.3c-8.4 4.1-18.9 4.1-27.3 0L157.2 435.2C71.6 393 16.8 306.4 16.8 213.5V140.2c0-25 14.6-47.6 37.5-57.4L242.6 2.9C246.8 1 251.4 0 256 0zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 55% !important;
}

/* === SYSTEM NAZWY === */
.cptc-v-check {
    display: inline-block !important;
    width: 1.15em !important;
    height: 1.15em !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    background-color: var(--cptc-primary) !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69L432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 55% !important;
}

.listing-owner-name a, 
.post-meta .author a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* === KARTA ZAUFANIA === */
.cptc-trust-card-2026 {
    background: var(--cptc-white);
    border: 1px solid var(--cptc-gray-200);
    border-left: 5px solid var(--cptc-primary);
    border-radius: var(--cptc-radius);
    padding: 24px;
    margin: 30px 0;
    box-shadow: var(--cptc-shadow);
}

.cptc-t-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.cptc-t-icon {
    background: var(--cptc-primary-soft);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cptc-t-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--cptc-primary);
}

.cptc-t-header h4 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cptc-gray-800);
}

.cptc-t-header p {
    margin: 5px 0 0 0 !important;
    font-size: 13px;
    color: var(--cptc-gray-600);
}

.cptc-t-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cptc-t-list li {
    font-size: 13px;
    font-weight: 500;
    background: var(--cptc-gray-100);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--cptc-gray-200);
    color: var(--cptc-gray-800);
}

/* === FORMULARZE === */
.cptc-p-box {
    background: var(--cptc-white);
    border: 1px solid var(--cptc-gray-200);
    border-radius: var(--cptc-radius);
    padding: 24px;
    margin: 20px 0;
}

.cptc-p-box h3 {
    margin-top: 0;
    color: var(--cptc-gray-800);
}

.cptc-u-ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cptc-u-p {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cptc-a-notif {
    background: #fffbeb;
    border-left: 4px solid #e67e22;
    padding: 15px;
    margin: 15px 0;
}

.cptc-p-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--cptc-gray-200);
    border-radius: 8px;
    margin: 10px 0;
    transition: border-color 0.2s;
    font-family: inherit;
}

.cptc-p-box textarea:focus {
    border-color: var(--cptc-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.cptc-delete-doc {
    margin-top: 10px;
}

/* === DASHBOARD ADMIN === */
.cptc-dashboard h1 {
    margin-bottom: 30px;
}

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

.cptc-stat-card {
    background: var(--cptc-white);
    padding: 24px;
    border: 1px solid var(--cptc-gray-200);
    border-radius: var(--cptc-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cptc-stat-card:hover {
    box-shadow: var(--cptc-shadow);
    transform: translateY(-2px);
}

.cptc-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.cptc-stat-icon.verified {
    background: #ecfdf5;
    color: #00a651;
}

.cptc-stat-icon.pending {
    background: #fffbeb;
    color: #e67e22;
}

.cptc-stat-icon.total {
    background: #eff6ff;
    color: #3498db;
}

.cptc-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.cptc-stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 36px;
    font-weight: 700;
}

.cptc-stat-content p {
    margin: 0 0 10px 0;
    color: var(--cptc-gray-600);
    font-size: 14px;
}

.cptc-stat-percentage {
    background: var(--cptc-primary-soft);
    color: var(--cptc-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* === ACTIVITY LOG === */
.cptc-activity-log {
    margin-top: 30px;
}

.cptc-activity-table {
    width: 100%;
    border-collapse: collapse;
}

.cptc-activity-table th,
.cptc-activity-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--cptc-gray-200);
}

.cptc-activity-table th {
    background: var(--cptc-gray-100);
    font-weight: 600;
    color: var(--cptc-gray-800);
}

.cptc-activity-table tr:hover {
    background: var(--cptc-gray-100);
}

/* === STATUS W TABELI UŻYTKOWNIKÓW === */
.cptc-status-verified {
    color: #00a651;
    font-weight: bold;
}

.cptc-status-pending {
    color: #e67e22;
    font-weight: bold;
}

.cptc-status-none {
    color: #ccc;
}

/* === LOADING STATE === */
.cptc-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.cptc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--cptc-gray-200);
    border-top-color: var(--cptc-primary);
    border-radius: 50%;
    animation: cptc-spin 0.6s linear infinite;
}

@keyframes cptc-spin {
    to { transform: rotate(360deg); }
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 768px) {
    .cptc-t-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cptc-t-list {
        flex-direction: column;
    }
    
    .cptc-t-list li {
        width: 100%;
        text-align: center;
    }
    
    .cptc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cptc-p-box {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cptc-trust-card-2026 {
        padding: 15px;
        margin: 20px 0;
    }
    
    .cptc-t-header h4 {
        font-size: 12px !important;
    }
    
    .cptc-t-list li {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .cptc-v-wrapper,
    .cptc-stat-card,
    .cptc-p-box textarea,
    .cptc-loading::after {
        transition: none;
        animation: none;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .cptc-trust-card-2026,
    .cptc-p-box {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .cptc-t-header h4,
    .cptc-stat-content h3 {
        color: #f0f0f0;
    }
    
    .cptc-t-list li {
        background: #2a2a2a;
        border-color: #444;
        color: #f0f0f0;
    }
}

/* === PRINT STYLES === */
@media print {
    .cptc-v-shield,
    .cptc-v-check,
    .cptc-delete-doc {
        display: none !important;
    }
    
    .cptc-trust-card-2026 {
        border: 1px solid #000;
        box-shadow: none;
    }
}
