/**
 * WC Copy Checkout Link - Frontend Styles
 */

/* Container */
.wccl-copy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}

.wccl-copy-wrapper.wccl-loop {
    margin: 10px 0 5px;
}

/* Botão de copiar */
.wccl-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.wccl-copy-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.wccl-copy-btn:active {
    transform: translateY(0);
}

/* Estado de sucesso */
.wccl-copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.wccl-copy-btn .wccl-icon,
.wccl-copy-btn .wccl-text {
    display: inline-flex;
    align-items: center;
}

.wccl-copy-btn .wccl-success {
    display: none;
    align-items: center;
    gap: 6px;
}

.wccl-copy-btn.copied .wccl-icon,
.wccl-copy-btn.copied .wccl-text {
    display: none;
}

.wccl-copy-btn.copied .wccl-success {
    display: inline-flex !important;
}

/* Input com o link */
.wccl-link-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Monaco', 'Consolas', monospace;
    color: #6b7280;
    background: #f9fafb;
    cursor: text;
    transition: border-color 0.2s ease;
}

.wccl-link-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wccl-link-input:hover {
    border-color: #d1d5db;
}

/* Versão compacta para loop de produtos */
.wccl-loop .wccl-copy-btn {
    padding: 8px 12px;
    font-size: 12px;
    width: 100%;
}

.wccl-loop .wccl-link-input {
    font-size: 10px;
    padding: 6px 10px;
}

/* Tooltip (opcional) */
.wccl-copy-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #1f2937;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.wccl-copy-btn:hover[data-tooltip]::after {
    opacity: 1;
    visibility: visible;
}

/* Responsivo */
@media (max-width: 768px) {
    .wccl-copy-wrapper {
        margin: 12px 0;
    }
    
    .wccl-copy-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .wccl-link-input {
        font-size: 11px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wccl-link-input {
        background: #374151;
        border-color: #4b5563;
        color: #e5e7eb;
    }
    
    .wccl-link-input:hover {
        border-color: #6b7280;
    }
}
