/**
 * Style dla frontendu systemu osiągnięć
 */

/* Główny kontener */
.pro-achievements-container {
    margin: 30px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pro-achievements-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
    color: #333;
}

/* Lista osiągnięć */
.pro-achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Pojedyncze osiągnięcie */
.pro-achievement-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.pro-achievement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Ikona osiągnięcia */
.pro-achievement-item .achievement-icon {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.pro-achievement-item .achievement-icon img,
.pro-achievement-item .achievement-icon-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.pro-achievement-item .achievement-icon-default {
    display: block;
    width: 80px;
    height: 80px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="48" height="48" fill="%23666"><path d="M12 2L8.72 8.5 2 9.73l5 4.86L5.82 22 12 18.54 18.18 22 17 14.59l5-4.86L15.28 8.5 12 2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
}

/* Zawartość osiągnięcia */
.pro-achievement-item .achievement-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pro-achievement-item .achievement-title {
    font-size: 18px;
    margin: 0 0 10px;
    color: #333;
}

.pro-achievement-item .achievement-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Style dla zdobytych osiągnięć */
.pro-achievement-item.earned {
    border-top: 4px solid #4CAF50;
}

.pro-achievement-item .achievement-earned-date {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.pro-achievement-item .achievement-earned-date .earned-date {
    font-weight: bold;
    color: #4CAF50;
}

/* Style dla przycisku odbierania nagród */
.pro-achievement-item .achievement-rewards-status {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    color: #4CAF50;
    font-weight: bold;
}

.pro-achievement-item .claim-rewards-button {
    display: inline-block;
    margin-top: 5px;
    background: #4CAF50;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.pro-achievement-item .claim-rewards-button:hover {
    background: #43a047;
}

/* Style dla dostępnych osiągnięć */
.pro-achievement-item.available {
    border-top: 4px solid #2196F3;
}

/* Style dla paska postępu */
.pro-achievement-item .achievement-progress {
    margin-bottom: 15px;
}

.pro-achievement-item .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.pro-achievement-item .progress-percentage {
    font-weight: bold;
    color: #2196F3;
}

.pro-achievement-item .progress-bar-container {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.pro-achievement-item .progress-bar {
    height: 100%;
    background: #2196F3;
    transition: width 0.3s ease-in-out;
}

/* Style dla wymagań */
.pro-achievement-item .requirements-list {
    list-style: none;
    margin: 10px 0;
    padding: 0;
}

.pro-achievement-item .requirement-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.pro-achievement-item .requirement-item:last-child {
    border-bottom: none;
}

.pro-achievement-item .requirement-item.completed {
    color: #4CAF50;
}

/* Przyciski i linki */
.pro-achievement-item .toggle-requirements,
.pro-achievement-item .toggle-rewards {
    display: inline-block;
    font-size: 13px;
    color: #2196F3;
    text-decoration: none;
    margin-top: 5px;
}

.pro-achievement-item .toggle-requirements:hover,
.pro-achievement-item .toggle-rewards:hover {
    text-decoration: underline;
}

/* Style dla osiągnięć innego użytkownika */
.pro-achievement-item.user-earned {
    border-top: 4px solid #FF9800;
}

/* Style dla nagród */
.pro-rewards-container {
    margin-top: 10px;
}

.pro-rewards-container h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #333;
}

.pro-rewards-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pro-rewards-list .reward-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.pro-rewards-list .reward-item:last-child {
    border-bottom: none;
}

/* Ikony dla różnych typów nagród */
.pro-rewards-list .reward-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.pro-rewards-list .reward-funds-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%23ffc107"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67 0-.84.79-1.43 2.1-1.43 1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81 0 1.79 1.49 2.69 3.66 3.21 1.95.46 2.34 1.15 2.34 1.87 0 .53-.39 1.39-2.1 1.39-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77-.01-2.2-1.9-2.96-3.66-3.42z"/></svg>');
}

.pro-rewards-list .reward-experience-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%239c27b0"><path d="M12 3L1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"/></svg>');
}

.pro-rewards-list .reward-gear-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%23607d8b"><path d="M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 9.9l3.62 8.12c.2.46.65.74 1.13.74.7 0 1.27-.57 1.27-1.27 0-.19-.05-.38-.13-.55l-.02-.04-3.67-8.28c-.13-.33-.45-.57-.82-.57h-.98zm-11.88.01c-.7 0-1.27.57-1.27 1.27 0 .19.05.39.13.55l.02.04 3.67 8.28c.13.33.45.57.82.57h.98c.17 0 .34-.09.43-.23l.07-.15 5.18-11.65c.16-.29.26-.61.26-.96 0-1.11-.9-2.01-2.01-2.01-.96 0-1.77.68-1.96 1.59l-.01.03-2.43 8.52L4.2 6.54c-.2-.46-.66-.74-1.14-.74h-.03z"/></svg>');
}

.pro-rewards-list .reward-bait-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="%234caf50"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.17-9.65l-5.66 5.66c-.39.39-1.02.39-1.41 0-.39-.39-.39-1.02 0-1.41l5.66-5.66c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41z"/></svg>');
}

.pro-rewards-list .reward-description {
    flex-grow: 1;
    font-size: 14px;
    color: #555;
}

/* Komunikaty */
.pro-achievements-empty,
.pro-achievements-login-message,
.pro-achievements-error {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #666;
    font-size: 16px;
    margin: 20px 0;
}

.pro-achievements-login-message {
    background: #e3f2fd;
    color: #1976d2;
}

.pro-achievements-error {
    background: #ffebee;
    color: #c62828;
}

/* Style dla statusu odebranych nagród */
.rewards-claimed-status {
    background-color: #e6f7e6 !important;
    border: 1px solid #4CAF50;
    padding: 15px !important;
    border-radius: 5px;
    margin-bottom: 15px;
}

.rewards-claimed {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
}

/* Responsywność */
@media (max-width: 768px) {
    .pro-achievements-list {
        grid-template-columns: 1fr;
    }
}
/* Style dla komunikatu o ukończonym osiągnięciu */
.achievement-claim-status {
    background: #e8f5e9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    color: #2e7d32;
    font-weight: bold;
    border: 1px solid #a5d6a7;
}

.claim-achievement-button {
    display: inline-block;
    margin-top: 5px;
    background: #2e7d32;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.claim-achievement-button:hover {
    background: #1b5e20;
}

/* Styles dla listy odebranych nagród */
.claimed-rewards-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f8e9;
    border-radius: 4px;
}

.claimed-rewards-list {
    margin: 5px 0 0;
    padding-left: 20px;
    list-style-type: disc;
}

.claimed-rewards-list li {
    font-size: 13px;
    padding: 2px 0;
}

/* Style dla powiadomień */
.pro-achievement-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: white;
    z-index: 9999;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.pro-achievement-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.pro-achievement-notification.success {
    background-color: #43a047;
}

.pro-achievement-notification.error {
    background-color: #d32f2f;
}

/* Efekty animacji */
.achievement-claimed-highlight {
    animation: achievement-claimed-animation 0.8s;
}

.reward-claimed-highlight {
    animation: reward-claimed-animation 1.5s;
}

.value-change-highlight {
    animation: value-change-animation 1.5s;
}

.level-up-highlight {
    animation: level-up-animation 1.5s;
}

@keyframes achievement-claimed-animation {
    0% { transform: scale(1); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
    50% { transform: scale(1.05); box-shadow: 0 5px 20px rgba(46, 125, 50, 0.4); }
    100% { transform: scale(1); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
}

@keyframes reward-claimed-animation {
    0% { background-color: transparent; }
    30% { background-color: rgba(76, 175, 80, 0.1); }
    100% { background-color: transparent; }
}

@keyframes value-change-animation {
    0% { color: inherit; }
    30% { color: #4CAF50; font-weight: bold; }
    100% { color: inherit; }
}

@keyframes level-up-animation {
    0% { transform: scale(1); color: inherit; }
    50% { transform: scale(1.2); color: #FF9800; }
    100% { transform: scale(1); color: inherit; }
}
/* Dodatkowe style dla animacji przenoszenia osiągnięć */
.newly-earned-achievement {
    animation: newly-earned-animation 2s;
}

@keyframes newly-earned-animation {
    0% { background-color: rgba(76, 175, 80, 0.05); }
    50% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: rgba(76, 175, 80, 0); }
}

/* Komunikat o braku osiągnięć */
.pro-achievements-empty {
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-align: center;
    margin: 15px 0;
    color: #666;
}