/**
 * Public specific styles
 */

/* Prize display container */
.nft-energy-prize-container {
    margin: 30px auto;
    max-width: 800px;
    padding: 0 15px;
}

.nft-energy-prize-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.nft-energy-prize-wrapper h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: #333;
}

/* Prize status icons */
.nft-energy-prize-status {
    text-align: center;
    margin-bottom: 30px;
}

.nft-energy-prize-status span.dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 15px;
}

.nft-energy-prize-status.active span.dashicons {
    color: #2271b1;
}

.nft-energy-prize-status.claimed span.dashicons {
    color: #46b450;
}

.nft-energy-prize-status.expired span.dashicons,
.nft-energy-prize-status.invalid span.dashicons {
    color: #dc3232;
}

.nft-energy-prize-status h2 {
    margin-top: 0;
    margin-bottom: 0;
    color: #333;
}

/* Prize details */
.nft-energy-prize-details {
    margin-bottom: 30px;
}

.nft-energy-prize-details h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2271b1;
    font-size: 24px;
    text-align: center;
}

/* Prize type indicators */
.nft-energy-prize-type {
    text-align: center;
    margin-bottom: 15px;
}

.prize-type-indicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #666;
}

/* Specific prize type styling */
.nft-energy-prize-type.generic .prize-type-indicator {
    background-color: #607d8b; /* Blue Grey */
}

.nft-energy-prize-type.nft_opensea .prize-type-indicator,
.nft-energy-prize-type.nft_other .prize-type-indicator {
    background-color: #2196f3; /* Blue */
}

.nft-energy-prize-type.crypto .prize-type-indicator {
    background-color: #f57c00; /* Orange */
}

.nft-energy-prize-type.physical .prize-type-indicator {
    background-color: #4caf50; /* Green */
}

/* Prize type specific content */
.nft-marketplace-link {
    margin: 20px 0;
    text-align: center;
}

.crypto-details {
    background-color: #fff3e0;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    border-left: 4px solid #f57c00;
}

.crypto-details.expired {
    background-color: #f5f5f5;
    border-left-color: #9e9e9e;
    opacity: 0.8;
}

.crypto-amount {
    font-size: 24px;
    font-weight: bold;
    color: #f57c00;
    margin: 0;
}

.physical-item-details {
    background-color: #e8f5e9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #4caf50;
}

.physical-item-details.expired {
    background-color: #f5f5f5;
    border-left-color: #9e9e9e;
    opacity: 0.8;
}

.shipping-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ccc;
}

.item-size {
    margin: 5px 0;
}

.nft-energy-prize-description {
    margin-bottom: 20px;
    color: #555;
}

.nft-energy-points-info,
.nft-energy-points-awarded {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.nft-energy-expired-message,
.nft-energy-invalid-message {
    text-align: center;
    color: #dc3232;
    margin-bottom: 20px;
}

/* Countdown timer */
.nft-energy-countdown-wrapper {
    margin-bottom: 30px;
    text-align: center;
}

/* QR Code styles */
.nft-energy-qr-code-section {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.nft-energy-qr-code-section h4 {
    margin-top: 0;
    color: #333;
    margin-bottom: 15px;
}

.nft-energy-qr-code {
    display: inline-block;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto 15px;
    max-width: 200px;
}

.nft-energy-qr-code svg {
    width: 100%;
    height: auto;
}

.nft-energy-qr-code.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 300px;
    width: 80%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nft-energy-countdown-wrapper h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.nft-energy-countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.countdown-section {
    background: #f5f5f5;
    border-radius: 5px;
    padding: 15px;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
}

.countdown-section span {
    display: block;
}

.countdown-hours,
.countdown-minutes,
.countdown-seconds {
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
    transition: color 0.3s ease;
}

.countdown-label {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

/* Warning styles for countdown */
.warning-countdown .countdown-section {
    background: #fff9c4; /* Light yellow background */
    border: 1px solid #ffd54f;
}

.warning-countdown .countdown-hours,
.warning-countdown .countdown-minutes,
.warning-countdown .countdown-seconds {
    color: #f57c00; /* Orange text */
}

/* Critical warning styles for countdown */
.critical-countdown .countdown-section {
    background: #ffebee; /* Light red background */
    border: 1px solid #ef5350;
    animation: pulse 1.5s infinite;
}

.critical-countdown .countdown-hours,
.critical-countdown .countdown-minutes,
.critical-countdown .countdown-seconds {
    color: #d32f2f; /* Red text */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 83, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 83, 80, 0);
    }
}

/* Notification permission button */
.notification-permission-button {
    display: block;
    margin: 20px auto;
    padding: 10px 15px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.notification-permission-button:hover {
    background-color: #135e96;
}

.notification-permission-button::before {
    content: "\f348"; /* Dashicons notification bell */
    font-family: dashicons;
    margin-right: 8px;
    vertical-align: middle;
}

/* Timer notification section */
.timer-notification {
    margin: 15px 0;
    padding: 10px;
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 4px;
}

.timer-notification p {
    margin: 0;
    font-size: 14px;
    color: #1b5e20;
}

/* Action buttons */
.nft-energy-actions {
    text-align: center;
}

.nft-energy-actions .button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

.nft-energy-actions .button-primary {
    background-color: #2271b1;
    color: #fff;
    border: none;
}

.nft-energy-actions .button-primary:hover {
    background-color: #135e96;
}

.nft-energy-actions .button-primary.claimed {
    background-color: #46b450;
}

.nft-energy-actions .button-primary:disabled {
    background-color: #7e8993;
    cursor: not-allowed;
}

/* Response messages */
.nft-energy-claim-response {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.nft-energy-claim-response.success {
    background-color: #f0f8ee;
    border: 1px solid #46b450;
    color: #2c7536;
}

.nft-energy-claim-response.error {
    background-color: #fef0f0;
    border: 1px solid #dc3232;
    color: #c62828;
}

/* Prize just claimed animation */
.prize-just-claimed {
    animation: glow 2s ease-in-out;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 rgba(70, 180, 80, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(70, 180, 80, 0.6);
    }
    100% {
        box-shadow: 0 0 0 rgba(70, 180, 80, 0);
    }
}

/* Celebration styles */
body.celebrating {
    overflow: hidden; /* Prevent scrolling during celebration */
}

/* Claim success animation */
.nft-energy-claim-response.success {
    animation: successPulse 1.5s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Canvas confetti styles */
#confetti-canvas {
    pointer-events: none;
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Success overlay styles */
.prize-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.prize-success-overlay.active {
    opacity: 1;
    visibility: visible;
}

.prize-success-overlay .success-message {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 90%;
    width: 500px;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.prize-success-overlay.active .success-message {
    transform: scale(1);
    opacity: 1;
}

.prize-success-overlay .success-icon {
    font-size: 50px;
    margin-bottom: 20px;
    animation: bounce 1.5s ease infinite;
}

.prize-success-overlay h2 {
    color: #46b450;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 15px;
}

.prize-success-overlay p {
    color: #333;
    font-size: 18px;
    margin-bottom: 0;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Leaderboard styles */
.nft-energy-leaderboard-container {
    margin: 30px auto;
    max-width: 800px;
    padding: 0 15px;
}

.nft-energy-leaderboard-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.nft-energy-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.nft-energy-leaderboard-table thead {
    background-color: #2271b1;
    color: #fff;
}

.nft-energy-leaderboard-table th,
.nft-energy-leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
}

.nft-energy-leaderboard-table th.rank,
.nft-energy-leaderboard-table td.rank {
    width: 80px;
    text-align: center;
}

.nft-energy-leaderboard-table th.points,
.nft-energy-leaderboard-table td.points {
    text-align: right;
    width: 100px;
}

.nft-energy-leaderboard-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.nft-energy-leaderboard-table tbody tr:hover {
    background-color: #f5f5f5;
}

.nft-energy-leaderboard-table td.rank {
    font-weight: bold;
}

.nft-energy-leaderboard-table .rank-icon {
    display: inline-block;
    margin-left: 5px;
}

.nft-energy-leaderboard-table .rank-1 .dashicons {
    color: #ffd700; /* Gold */
}

.nft-energy-leaderboard-table .rank-2 .dashicons {
    color: #c0c0c0; /* Silver */
}

.nft-energy-leaderboard-table .rank-3 .dashicons {
    color: #cd7f32; /* Bronze */
}

.nft-energy-leaderboard-empty {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #555;
}

/* Responsive styles */
@media screen and (max-width: 600px) {
    .nft-energy-prize-wrapper {
        padding: 20px;
    }
    
    .nft-energy-countdown {
        gap: 10px;
    }
    
    .countdown-section {
        padding: 10px;
        min-width: 60px;
    }
    
    .countdown-hours,
    .countdown-minutes,
    .countdown-seconds {
        font-size: 22px;
    }
    
    .countdown-label {
        font-size: 12px;
    }
    
    .nft-energy-leaderboard-table th,
    .nft-energy-leaderboard-table td {
        padding: 8px 10px;
    }
}
