/**
 * Perplexity Text Analyzer Styles
 */

/* Debug information is now handled via console logs only */

#perplexity-analyzer-container {
    position: absolute;
    z-index: 999999;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
    overflow: visible; /* Prevent clipping of child elements */
    padding: 2px; /* Minimal padding to prevent clipping */
}

#perplexity-analyzer-button {    
    pointer-events: auto;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform 0.2s ease;
}

#perplexity-analyzer-button:hover {
    transform: translateY(-3px);
}

/* Custom tooltip styles */
.perplexity-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000000;
}

#perplexity-analyzer-button:hover .perplexity-tooltip {
    opacity: 1;
}

#perplexity-options-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-left: 10px; /* Changed from margin-right to margin-left */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(-20px); /* Changed from 20px to -20px to slide from the left */
    white-space: nowrap;
    overflow: visible; /* Prevent clipping of child elements */
    padding: 10px; /* Add padding to ensure hover effects aren't clipped */
    position: absolute;
    right: 100%; /* Position to the left of the button */
}

/* Options container with all buttons in a single row */
#perplexity-options-container {
    display: flex;
    flex-direction: row-reverse; /* Reverse order for left-side display */
    gap: 10px;
}

/* Option buttons general appearance */
.perplexity-option-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #222222; /* Default background, will be overridden by inline styles */
    color: white;
    border-left: 3px solid transparent; /* Default accent color, will be overridden by inline styles */
    border-right: 1px solid transparent; /* Default accent color, will be overridden by inline styles */
    border-bottom: 1px solid transparent; /* Default accent color, will be overridden by inline styles */
    border-top: 1px solid transparent; /* Default accent color, will be overridden by inline styles */
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    opacity: 1;
    transition: all 0.2s ease;
}

.perplexity-option-button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* General dashicon styling for all buttons */
.perplexity-option-button .dashicons {
    margin-right: 5px;
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
    vertical-align: text-bottom;
}

/* Utility button styling (copy/print) */
.perplexity-option-button.utility {
    background-color: #222222;
    border-left: 3px solid #9e9e9e;
    border-right: 1px solid #9e9e9e;
    border-bottom: 1px solid #9e9e9e;
    border-top: 1px solid #9e9e9e;
}

/* Visual feedback for copy button */
.perplexity-option-button.copied {
    background-color: #43a047;
    border-left: 3px solid #2e7d32;
    border-right: 1px solid #2e7d32;
    border-bottom: 1px solid #2e7d32;       
    border-top: 1px solid #2e7d32;
    color: white;
}
