/**
 * Click to Copy Module Styles
 * Quote style with copy button in top right corner
 */

.gp-click-to-copy-container {
    margin: 24px 0;
    width: 100%;
}

.gp-copy-wrapper {
    position: relative;
    background-color: #ffffff;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
    padding: 20px 50px 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.gp-copy-wrapper:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Copy Button - Top Right Corner */
.gp-copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    font-size: 0;
    transition: all 0.2s ease;
    outline: none;
    z-index: 10;
}

.gp-copy-button:hover {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
}

.gp-copy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 102, 204, 0.2);
}

.gp-copy-button.copied {
    background-color: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

/* Copy Content - Quote Style */
.gp-copy-content {
    font-style: italic;
    color: #333;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

.gp-copy-content p {
    margin: 0 0 12px 0;
    font-style: italic;
}

.gp-copy-content p:last-child {
    margin-bottom: 0;
}

.gp-copy-content::before {
    content: '"';
    font-size: 48px;
    line-height: 0;
    color: #0066cc;
    opacity: 0.3;
    font-family: Georgia, serif;
    position: absolute;
    top: 20px;
    left: 20px;
}

.gp-copy-button:hover {
    background-color: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.gp-copy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Copy Icon */
.gp-copy-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

.gp-copy-button.copied .gp-copy-icon {
    display: none;
}

.gp-copy-button.copied::after {
    content: "✓";
    font-size: 16px;
    line-height: 1;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gp-copy-wrapper {
        padding: 16px 45px 16px 20px;
    }
    
    .gp-copy-button {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
    }
    
    .gp-copy-content {
        font-size: 15px;
    }
    
    .gp-copy-content::before {
        font-size: 40px;
        top: 16px;
        left: 16px;
    }
}

/* Focus states for accessibility */
.gp-copy-button:focus-visible {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Animation for copy feedback */
@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.gp-copy-button.copied {
    animation: copySuccess 0.3s ease;
}

/* ========================================
   Editor Styles for Inline Editing
   ======================================== */
.gp-click-to-copy-block-editor .gp-copy-wrapper {
    position: relative;
}

.gp-click-to-copy-block-editor .gp-copy-text-edit {
    color: #333 !important;
    font-size: 16px !important;
    font-style: italic !important;
    line-height: 1.7 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    cursor: text !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    min-height: 40px !important;
}

.gp-click-to-copy-block-editor .gp-copy-text-edit:focus {
    outline: 2px solid #0066cc !important;
    outline-offset: 4px !important;
    border-radius: 4px !important;
    outline-style: dashed !important;
}

.gp-click-to-copy-block-editor .gp-copy-text-edit[data-is-placeholder-visible="true"]::before,
.gp-click-to-copy-block-editor .gp-copy-text-edit::placeholder {
    color: #999 !important;
    font-style: italic !important;
    opacity: 0.7 !important;
}
