/* Copy Button Styles */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0.6;
}

.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
    opacity: 1;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn:focus {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}

.copy-btn svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Copy Feedback Styles */
.copy-feedback {
    position: absolute;
    top: 0;
    right: 40px;
    display: none;
    color: #2e7d32;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: #e8f5e9;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #a5d6a7;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, scale 0.2s ease;
    z-index: 100;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateX(0);
    display: inline-block;
    animation: pulseGlow 2s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .copy-btn {
        padding: 3px;
    }
    
    .copy-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .copy-feedback {
        font-size: 0.8rem;
        right: calc(30px + 1rem);
    }
}

/* Animations for feedback */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 15px rgba(76, 175, 80, 0.6); }
    100% { box-shadow: 0 0 0 rgba(76, 175, 80, 0.4); }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .copy-btn,
    .copy-feedback {
        transition: none;
        animation: none;
    }
}